Announcement Announcement Module
Collapse
No announcement yet.
Page Parameters to Templates Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Page Parameters to Templates

    Hi there!
    Is there a way to define some Parameters in the page xml file to pass the parameters to the template? For Example every page has its own icon and i want to pass the icon-url to the template wich renders my pages.
    Is that possible and how?

    thx for help and best regards!

  • #2
    OK, i found the solution:
    in the page definition XML add:
    <properties>
    <yourPropertyName>yourValue</yourPropertyName>
    </properties>

    it is accessable in the template like ${context.page.properties.yourPropertyName}


    regards!

    Comment


    • #3
      That is correct, you can do this for most of the surf objects i.e. pages, templates and components. Put any name/value pair into the <properties> element within the descriptor file and it will be made available for the appropriate object context. It is commonly used for simple component configuration - as because like all WebScript + Surf artifacts, the descriptor files can be overridden in a custom configuration and those properties overridden with it.

      Cheers,

      Kev

      Comment

      Working...
      X