Hello,
i've got a comb single list template variable as :
choice 1==1||choice 2==2||choice 3==3
Some of resources used this tv, when I return the value, like, 1, 2 or 3, I would like to return the text associate with them, like "choice 1", "choice 2" or "choice 3", is there any api object to do it ?
Thanks.
Olivier.
Low
Imagine this tv:
tvExample (combo list) = "choice 1==1||choice 2==2||choice 3==3"
In a resource, the tvExample is 2
In the render template, I want to show this tv (the value) and not key, like "choice 2", and not 2
With this format, I can add, or remove one or more 'choice', no care about the order of them, just the key, because it's the key who is recorded, not the value.
Another question : how to return the content of a raw combo list, like my example "choice 1==1||choice 2==2||choice 3==3" with the modx api, just the row not the key recorded in a resource.
Hope I explain good as well you can understand what I mean.
Thanks.
Olivier.
Low
-
☆ A M B ☆
- 339 Posts
Did you find a solution for this?