page_attr tag

We need your assistance to make the documentation accurate, user friendly and understandable. Therefore we welcome any tips or suggestions regarding documentation. Thank you in advance for your contribution.

However, we will not respond to technical support questions submitted using this form. If you are having difficulty with CMSMS and cannot find the solution on this website, please submit your question appropriately on our support forum at: http://forum.cmsmadesimple.org. Please remember to follow the forum rules when posting.

CMS Made Simple™ Partner



   Purpose

This tag can be used to return the value of the attributes of a certain page.

   How to use?

Insert the tag into your template/page like:

<p>The content of the Extra 1 field is: {page_attr key='extra1'}</p>

   Available parameters

  • (optional) page (int|string) - An optional page id or alias to fetch the content from. If not specified, the current page is assumed.
  • key (required) - The key to return the attribute of. Available are:
    • content_en
    • title
    • disable_wysiwyg
    • extra1
    • extra2
    • extra3
    • image
    • pagedata
    • searchable
    • target
    • thumbnail
    • (name of included custom content block)
  • assign - Assign the results to the named smarty variable.

   Syntax examples

{page_attr key='extra1'}
{page_attr key='content_en' page='contact' assign='foo'}