Copied to clipboard

Flag this post as spam?

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


  • Nami Nasserazad 23 posts 43 karma points
    May 26, 2011 @ 17:13
    Nami Nasserazad
    0

    Dynamic Macro

    Hi

    I have a content type called "FormContentType". This type has a field called "FormAlias". I have number of Macros pointing to UserControl forms. In corresponding templates of contents of "FormContentType" type, I'd like call that Macro based on the value entered in "FormName" field. I want to have some thing like this:

    <umbraco:macro alias="[#FormAlias]"  runat="server"/>

    Notice that macor alias is dynamic and is based on what is entered in "FormAlias" field of content. But it does not work. If I put the name of one of those form macros explicitly, it works. But using above statement, it does not work. Is this something related to page life cycle?

    Could you please help me?

    Regards,

    Nami

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    May 26, 2011 @ 17:54
    Lee Kelleher
    0

    Hi Nami... it sounds like a job for the Macro Container data-type: http://umbraco.com/help-and-support/video-tutorials/umbraco-fundamentals/datatypes/using-the-macro-container-datatype

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft