Copied to clipboard

Flag this post as spam?

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


  • ds 191 posts 223 karma points
    Dec 02, 2011 @ 23:20
    ds
    0

    Add pageName into macro property

    I have a macro like in the following. I want to insert pageName property into TitlePropertyAlias macro property. How could I do it?

    <umbraco:Macro UlCssId="sidebarInnerTopMenuNavSub" Level="2" NaviHideProperty="umbracoNaviHide" CurrentItemCssClass="" TitlePropertyAlias="" Alias="TranslatedNavigationSub" runat="server"></umbraco:Macro>
  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Dec 03, 2011 @ 01:44
    Rasmus Berntsen
    0

    Hi ds,

    Just a quick question: Why do you want to add the current pageName as a parameter on your Macro? I guess you want to get this name dynamically and use it in your code somewhere? So why not do this in your code instead of using a parameter? 

  • Martin Rud 232 posts 902 karma points c-trib
    Dec 03, 2011 @ 14:50
    Martin Rud
    0

    Hi ds,

    I agree with Berntsen: If you always need some property data from the current page you can grab it from within your macros code. 

    But to answer yor question, you should be able to do it this way:

    <umbraco:MacroUlCssId="sidebarInnerTopMenuNavSub"Level="2"NaviHideProperty="umbracoNaviHide"CurrentItemCssClass=""TitlePropertyAlias="[#pageName]"Alias="TranslatedNavigationSub"runat="server"></umbraco:Macro>

    In general it is: macroattribute="[#propertyalias]".

     

    Regards,

    Martin

     

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft