Intershop: how to access values from a MultiString object in an .isml file

236 views Asked by At

The MutliString takes strings separated by a pipe '|', and is meant to be iterated over in an .isml template but I'd like to access the values directly by index. I couldn't find any examples in the docs and the only thing that worked was using a loop with a counter. Is there a way to do something like this...

 CategoryBO:ExtensibleObject:Attribute("myCustomAttribute"):get(0)

UPDATE: I ended up iterating over the multistring object and assigning the values to ISML variables;

 // if counter EQ 1; assign to var with <isset>
 // if counter EQ 2; etc...
  • ISML loops start their index at 1, not 0.
1

There are 1 answers

0
Rainer Blessing On

You could write an extension to the CategoryBO which can return a specific index value. It would need to store the Multiple String value from the EO. But as you found out yourself, the Extensible interface has no option to return an index.