Truly impressive Dimmy.
1 more post Dimmy...you can do it!
Hi Dimmy,
I’m just curious on a use for your @select code which I really like a lot. Perhaps, you have already accomplished the below with it?
I’m trying to create a link based on what is selected, but can’t figure out how to retrieve the pagetitle? The output of the TV is the id for the selected item, but I’m trying to figure out how to set the anchor text based on the ID.
So, if I choose Product #1 from the select box, which has an ID of 17, how would I get something like <a href="[~17~]">Product #1</a>?
I hope you might have an answer. I was thinking this may be something possible with PHX?
You can use the getField-snippet to get the fields with &field=`thefield` from other resources. default for &field is pagetitle.
<a href="[~[*yourTV*]~]">[!getField? &docid=`[*yourTV*]`!]</a>
or if you want to use it in a ditto-chunk:
<a href="[~[+yourTV+]~]">[[getField? &docid=`[+yourTV+]`]]</a>
Works perfectly. Thanks guys.