Is there a way to dynamically populate a unordered list based on metadata?
example: default format (search asset or asset Listing page)
<li>%asset_metadata_discipline_value%</li>
or
<li>%asset_metadata_discipline_key%</li>
The only problem is I only want this be added once i.e if there's multiple assets tagged "education" I only want education added once to the list.
Reason:
The list is based on many disciplines and I don't want to show any list items that haven't been tagged
functionality:
I have a filtered dropdown that filters assets using MixItUp plugin. I know I can hard code the list but for maintanence sake it would be great for it to be dynamic based on tagged assets (profiles).
assets: search asset, asset listing page (testing), MixItUp plugin, metadata schema and standard pages, paint layout
Could maybe try using the asset listing but use custom grouping (and group by the metadata value) - and in the group format print the list item html and group keyword (ie the metadata value).
In the default (or type specific format) just have no content and set the container content to raw html. Not sure if you still need to include the asset_listing keyword in the group format section though (either way it won't print anything).
This should give you a list of unique metadata values.
This second method works very well if you're doing a lot of stuff or have multiple keywords being rendered based on the value of a single keyword.
Note the use of both "^notempty: " and "^empty:...". If you don't include the ^notempty: with some white space after it, the keyword will render if it's not empty. Which is not so good.