Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John 88 posts 112 karma points
    Jul 28, 2011 @ 00:55
    John
    0

    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

  • Fengelz 106 posts 221 karma points
    Jul 29, 2011 @ 09:19
    Fengelz
    0

    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

  • John 88 posts 112 karma points
    Jul 29, 2011 @ 10:01
    John
    0

    Yeah no, cheers, what I wanted was [#pageID]

  • 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.

Please Sign in or register to post replies