on 12-30-2017 1:47 AM
I have created a new template to be used in content page creation. In our *-items.xml file, I have modified the ContentPage before to add additional fields that you can set in the Hybris CMS, but I would like to add a field that is only visible if the new template is used.
The template is for a specific layout and has a call to google fonts, which will allow the creator of the page to enter a list of font families that would only be available on this new page. The variable would be in the script tag that makes to call to google fonts with the specified font family names. Like this:
Variable: ${fontFamilyList}
<jsp:attribute name="pageCss">
<link href="https://fonts.googleapis.com/css?family=${fontFamilyList}" rel="stylesheet" />
</jsp:attribute>
I know how to add a new field to all ContentPage templates and have done just that in a different project, but I do not know how to do this for a single template. Can this be done via the items.xml file?
Does anyone know how to do this?
Hi Steve,
I will give that a try and let you know how it works. Thanks for the suggestion. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John - how about extending ContentPage with a new type such as RichContentPage - and add the field to that new type only - then create the templates you want to apply to only, based on RichContentPage ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.