I have a metadata field setup as checkboxes on the backend multiples allowed, it is used to categorise assets.
I want to output the name of these checkboxes on the front end of the site.
I use asset listing to list assets to which these metadata applied and I want to output metadata options to use them as filters.
using metadata keywords I can output the value of the metadata field applied to the asset, but I need to output all of them.
I hope I made myself clear. I thought this would be simple, but the answer eludes me.
Option1: You can hard code the filters manually. You will have more control on them.
Option2.
Have a new Filter Schema with Filter Checkboxes and apply it to a Standard Page.
In your asset listing, you can use the following keyword to pull the metadata values from the standard page with paint layout applied %globals_asset_contents_paint_layout_id_<paint_layout_id>:<assetid>%
Use SSJS in the paint layout to format your filters accordingly.
It is bit of work in the beginning but easy to manage the filter list from metadata screen.
Sorry I am not following on option 2.
I already have metadata schema applied to assets under the asset listing and a particular field in the metadata has multiple values say:
The information you’re after is only available in the attributes of the Metadata Select Field asset itself. If you’re >5.4.2.2 you can get at this with a combination of SSJS and %asset_data_attributes%.
The attribute is called select_options, so essentially you want to grab that with SSJS, loop over it and spit out a checkbox for each item.
Assuming the field asset is #795, and it’s set up such that the exported CSV of the options looks like
“I already have metadata schema applied to assets under the asset listing and a particular field in the metadata has multiple values say:_”
You are using asset listing to list assets with metadata field has multiple values selected. Setting up filters is totally seperate implementation which you can include either at the landing/listing page or at “Page contents” bodycopy of asset listing.
Try to think and implement it separately from your asset listing.