Copied to clipboard

Flag this post as spam?

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


  • chris 69 posts 92 karma points
    Feb 10, 2011 @ 21:40
    chris
    0

    macro parameter from alias in a template

    I'm trying to insert a value from a property that I added in the doc type. I'm using this for doc2form, in the ResponseMessage parameter.

    I tried using ResponseMessage="This is a test [#emailConfirmMsg]" and this always return [#emailConfirmMsg] instead of the actual value. I also tried using <umbraco:Item field="emailConfirmMsg" runat="server"></umbraco:Item> in the parameter, this didn't work either, with single and double quotes.

    Is this even possible?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 10, 2011 @ 21:48
    Jan Skovgaard
    0

    Hi Chris

    what version of Umbraco are you experiencing this on? What does your document type look like? Could you perhaps post a screendump?

    /Jan

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Feb 10, 2011 @ 21:55
    Tom Fulton
    1

    Hi Chris,

    If I recall, the Macro Parameter Syntax [#propertyAlias] does not work as a part of a string, only when it's by itself.  For example, ResponseMessage="[#emailConfirmMsg]" should work but ResponseMessage="This is a test [#emailConfirmMsg]" wont work.

    Can you put all the text you need into the field?  Otherwise you might have to add another parameter to the macro and concatenate the two.

    -Tom

  • chris 69 posts 92 karma points
    Feb 11, 2011 @ 00:35
    chris
    0

    Tom, that is the solution! Thanks :)

Please Sign in or register to post replies

Write your reply to:

Draft