Markers
Z-CMS has the following markers "#" and "@[]" that can be used for specific purposes.
Consider the "#" marker.
Though "#" implies "do nothing" in Z-CMS, usage is restricted just to inform Z-CMS whether to append the Site context URL to a resource path or not.
Two relevant scenarios can be described:
- Consider that a General Content Model is used to manage the banner of a site and the "image" Attribute of the particular Content Model is used to store an image required for the banner. While creating a Widget to contain the Content Model, image source must be set as follows:
<img src="#[zcms:attribute:image]" width="600" height="250" />
Here, the particular image is stored in the General perspective and hence it is not required to append the site context URL to the image path.
- Consider here another scenario where it is required to provide a link to an external URL:
<zcms:is attribute="EXTERNAL_URL" operation="NOT_EMPTY"> <a class="link" href="#[zcms:attribute:EXTERNAL_URL]" target="_blank">Click here</a> <zcms:else> <a class="link" href="#http://www.gruppozenit.com" target="_blank">Click here</a> </zcms:else> </zcms:is>
Now consider the "@[]" marker.
It is used to create and point a user-defined variable in Z-CMS.
Consider a scenario where it is required to pass values to a Widget when it is included in a webpage.
Let the name of the Widget be "service" and its type be "menu":
<ul> <li> <a class="@[home]" href="" shape="rect"><zcms:content-static name="Link_Home" /></a> </li> <li>|</li> <li> <a href="https://www.sitename.com/customer/" shape="rect" target="_blank"><zcms:content-static name="Link_Secure" /></a> </li> <li>|</li> <li> <a class="@[legal]" href="/legal_info" shape="rect"><zcms:content-static name="Link_Legal" /></a> </li> <li>|</li> <li> <a class="@[contact]" href="/contact_us_map/world" shape="rect"><zcms:content-static name="Link_Contact" /></a> </li> </ul> <div class="txt"><zcms:content-static name="Copyright_text" /></div> <zcms:include widget="Logo" type="footer"> </zcms:include>
Values to the Widget can be passed as follows through the user-defined variables when it is included in the webpage:
<zcms:include widget="service" type="menu" home="green" legal="red" contact="blue" />