Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey. I've read that you can use variables in templates in macro properties; like:
<umbraco:Macro alias="X" param1="[@umbPageId] param2="[#id]" runat="server" />
However the values coming through for me are 0 (it's an int property). Am I missing something?
Cheers
The concept is correct. (documentation can be found here: http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax)
Did you declare the properties in the macro as well?
HTH
- Sune
Yeah no, cheers, what I wanted was [#pageID]
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Dynamic templates variables
Hey. I've read that you can use variables in templates in macro properties; like:
<umbraco:Macro alias="X" param1="[@umbPageId] param2="[#id]" runat="server" />
However the values coming through for me are 0 (it's an int property). Am I missing something?
Cheers
The concept is correct. (documentation can be found here: http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax)
Did you declare the properties in the macro as well?
HTH
- Sune
Yeah no, cheers, what I wanted was [#pageID]
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.