[ 
https://issues.apache.org/jira/browse/OFBIZ-5823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176725#comment-14176725
 ] 

Deepak Dixit commented on OFBIZ-5823:
-------------------------------------

Hi Pierre,

Thanks for the screen shot, I am able to add the metadata from cms tree scree. 
There are two way to add the meta data: 
- In first way you can add the meta data in "ContentMetaData" entity based on 
metaDataPredicateId and can access it using following way:
{code}
<meta name="description" 
content="${(decoratedContent.metadata['<metaDataPredicateId>'])!}"/>
{code}
You can create this type of meta data form 
http://demo-trunk-ofbiz.apache.org/content/control/EditContentMetaData?contentId=CMSS_DEMO_PAGE1

- Another way is to add the the metadata as subcontent. ie. Create the content 
and create content assoc and can access the meta data content using following 
way:
{code}
<meta name="description" 
content="${(decoratedContent.subcontent.metaDescription.render)!}"/>
{code}

You can crate this type of metadata form 
http://demo-trunk-ofbiz.apache.org/content/control/WebSiteCms?webSiteId=CmsSite

You are right, we need to make it consistent and will need to use the 
ContentMetaData entity for this.

Let's wait for others opinion...

> Add CMS metadata into renderer context
> --------------------------------------
>
>                 Key: OFBIZ-5823
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5823
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content, specialpurpose/cmssite
>    Affects Versions: Trunk
>            Reporter: Gaudin Pierre
>            Priority: Minor
>             Fix For: Trunk
>
>         Attachments: CMSMetadata.patch, Screen Shot 2014-10-18 at 8.19.17 
> PM.png, screenshot-1.png
>
>
> In website CMS, for a page, you can specify metadata.
> Unfortunatly those metadata are not availables into the cms page context.
> This patch add metadata into context of all pages. Thus you can use them.
> To test this patch, add metadata  associated to a cms page (ie 
> metaDescription).
> Edit the cms page to add ${metaDescription}.
> Then display the page 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to