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
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>
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?
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
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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?
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?
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:
In general it is: macroattribute="[#propertyalias]".
Regards,
Martin
is working on a reply...