Generate all variables contained in an LV group
I want to generate all variables that are contained in an LV group. The aim is to then use them to populate the option values of a select dropdown for use in (Solspace's) Super Search. The variables also all follow the same naming convention article_type_name.
I don't want to hardcode them, because they may be added, removed and edited by the client. The group of variables are also used as dropdown custom field group in the site's publish forms.
How can I go about it?
Replies
Low 26 Feb 2013 10:49
You could use the Query module:
...where X is the variable group ID.
Seb Neerman 26 Feb 2013 11:55
Thanks Low. I'll give that a go.
On a different note, could you kindly remove this post as 1Password and Get Satisfaction's login modal have decided to replace my post's title with my login address.
Low 26 Feb 2013 11:57
I believe you should be able to edit the post. If you can, please do, so I can keep the thread for future reference.
Seb Neerman 26 Feb 2013 12:28
No, it's not possible to edit it. I've sent GS support a mail though.
Back on topic... I've tried the query but I'm getting nothing. I've double checked the low.group_id (3). I've tried moving the query outside the super:search tag. And template debugging doesn't reveal anything untoward.
Low 26 Feb 2013 12:31
Just tested it; the query should produce results. Are you sure the Query module is installed?
Seb Neerman 26 Feb 2013 13:06
Please ignore my madness. It's working beautifully :) You'r a star, thanks.
And GS have changed this post's title.