I have a container template (CT) with a few metadata fields. I wanted to use a template so these fields weren’t buried on the actual metadata screen.
The assets that use this CT are listed on an asset listing page, where I’ve used some of the metadata fields as used in the CT in the default format. However, the asset listing page isn’t displaying anything.
On the metadata screen of the assets, the fields are empty. Does filling them in the CT not populate them on the metadata screen? Is this why using %asset_metadata_% on the AL default format doesn’t work?
Correct, when you use a CT and allow metadata fields to be added, those metadata values are added to each individual content container, not the overall Standard Page. A representation of this is shown here: Content Templates - Manuals | Squiz Matrix 5 Documentation
If you are using an asset listing to list the standard pages, and you want to print the contents of the standard page including it’s content template, you should be able to use %asset_contents% as the keyword in the type format. This will print the Standard page contents using the PL that is applied on the frontend as well, but also the content containers PL from their applied CTs, so it may not give you what you want.
What you could do instead though, is to first list the Standard Pages, then have another asset listing that is nested into the type format that lists content containers, where you would have access to print the individual containers contents and metadata.
What you could do instead though, is to first list the Standard Pages, then have another asset listing that is nested into the type format that lists content containers, where you would have access to print the individual containers contents and metadata.
I have created the CT, Metadata Schema, Simple Edit form and an asset listing but would like to know how to produce the above to output metadata fields in an asset listing. I am using this in a simple FAQs with Question and Answers being the Metadata fields. As Edward noted, I would like my clients to edit the metadata from the CT and output those on the asset listing.
Not sure if there is a solution to this yet, I can’t see one anywhere.
I created a Content Template with nested asset listings inside of the paint layout and needed to be able to restrict the number of items those asset listings list by capturing the metadata that is set inside the content template container.
To explain, asset_children^index:0 means we want the page contents as_asset and we want it’s child containers as_asset and then we want the metadata applied to those containers.
If we are looking for a particular metadata field and there are not multiples of the same applied to the child containers we might get a result such as [null,null.“metadata_value”,null,null,null]
if we implode that, the result will be metadata_value