-
Jul 27th, 2010, 02:44 AM
#1
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!
-
Aug 2nd, 2010, 01:31 AM
#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!
-
Aug 18th, 2010, 04:54 AM
#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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules