solved item tags in select dropdown

blindmime
@blindmime
8 years ago
772 posts
I would like a dropdown select menu populated with all the audio item tags I've added.
updated by @blindmime: 03/23/17 07:54:00AM
paul
@paul
8 years ago
4,326 posts
You'd just need to add the html code to do this to the appropriate place in the appropriate template. To get the tags, use a jrCore_list call -

{jrCore_list module="jrTag" search="tag_module = jrAudio" group_by="tag_text" limit=100" template="null" assign="_AudioTags"}

This will return all the unique audio tags in the array $_AudioTags so you can loop round that to create the menu dropdown.
Hope that helps
Pa


--
Paul Asher - JR Developer and System Import Specialist
blindmime
@blindmime
8 years ago
772 posts
Thanks, Paul! That works great. Use jrTags instead of jrTag though. Instead of assigning it, I sent it to template thusly:

{if isset($_items)}
  {foreach from=$_items item="row"}
<option value="{$row.tag_text|replace:'%20':' '|capitalize}">{$row.tag_text|replace:'%20':' '|capitalize}</option> 
  {/foreach}
{/if}

Tags