As explained here https://experienceleague.adobe.com/docs/experience-manager-guides-learn/tutorials/configuring/config... it is mentioned we can also add metadata information as variables or fields in your page layout. This metadata is stored in your source DITA map content, and it can be easily inserted in your page layout.
Please provide a code syntax on how to get the values of these custom metadata variables in the templates .plt files?
Views
Replies
Total Likes
To add metadata information as variables or fields in your page layout: you can use the metadata elements that are added inside the bookmeta of your DITA map content.
Example: If I want to insert the metadata product name from the below DITA map.
I would create a custom metadata field for product name using xpath expression.
Xpath expression for fetching product name is //prodinfo[1]/prodname
And insert the custom metadata field in the page layout like below
Output:
Thank you for the explanation. A few questions around this
1. We are not using bookmap where we can define bookmeta tags. Can we using keydef tags keyword and map attribute 'product' value as well in the plain map (not bookmap)? If yes what is the expression to access them?
<map product="Sample Product">
<keydef keys="Product_Name">
<topicmeta >
<keywords>
<keyword>Product Keyword 1234</keyword>
</keywords>
</topicmeta>
</keydef>
</map>
2. Is it possible to inject jcr:content or /jcr:content/metadata node properties of the ditamap asset into native PDF publishing?
1. Yes, metadata rendering works on the elements inside topicmeta for plainmaps.
//keywords[1]/keyword
2. Possibility of injecting JCR Assets metadata is something we are working on, and will be available by year end.
topicmeta metadata works when topicmeta tags are directly child nodes put under map. Something like this.
<map product="Sample Product">
<topicmeta >
<keywords>
<keyword>Product Keyword 1234</keyword>
</keywords>
</topicmeta>
</map>
It is not working if it is under a keydef node. So is it possible to get the value out of this topicmeta OR we have to change the placement of the topicmeta?
<map product="Sample Product">
<keydef keys="Product_Name">
<topicmeta >
<keywords>
<keyword>Product Keyword 1234</keyword>
</keywords>
</topicmeta>
</keydef>
</map>