Answer the question
In order to leave comments, you need to log in
How else to process the last element in the modx snippet?
Hello. Question for modx connoisseurs, surely the solution lies in writing your own snippet, although maybe there are some simpler ways?
Using minishop2, I need to output all options of the "Size" property of a product separated by commas. I did it this way:
Answer the question
In order to leave comments, you need to log in
In normal cases, the placeholder, which is the ordinal number of the element, would help, it could be compared using modifiers and in the case where would be equal to , process without a comma , but, unfortunately, the msOptions snippet did not contain such a placeholder and I had to duplicate the snippet and stupidly cut off the last character from the output using substr
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question