I’ve been trying to get my head around this, please bear with me:
I have a folder which holds my News articles, the title of which is in a TV called NewsTitle. In my main news page, I am trying to populate a dropdown list with the NewsTitle TV, but all I get is an empty dropdown.
In my article page, I call Ditto like this:
<form method="post">
<select>
[[Ditto? &tpl=`DittoSearchNewsTemplate` &summarize=`10` &displayArchive=`0` &startID=`53`]]
</select>
<input type="submit" value="Submit" />
</form>
<br />
[[Ditto? &tpl=`DittoNewsTemplate` &summarize=`1` &displayArchive=`0` &startID=`53`]]
My DittoSearchNewsTemplate chunk looks like this:
<option value ="[~[+id+]~]">[+tvNewsTitle+]</option>
(The second Ditto call is just to show the first article in the folder).
To debug, I tried outputing it as a <ul> and it worked fine. But when I tried a dropdown list, I get an empty dropdown list.
Can anyone point this newbie in the right direction?
Thanks.
Bobby