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
Hi all,
Looking for some help if it's possible!
I need to see if it's possible to pass a parent nodes field value through a macro. The current macro looks this this if run from the parent template
<umbraco:Macro PropertyID="[#pageID]" Alias="ucBookingForms" runat="server"></umbraco:Macro>
But what i need to do is the parent node has a child which runs this macro but needs to still use the pageID of the parent if that makes sense!
In a nutshell it needs to look like this
<umbraco:Macro PropertyID="(parentnode)/[#pageID]" Alias="ucBookingForms" runat="server"></umbraco:Macro>
Cheers all
Pete
still pass in the page Id to the macro as in the original and then in the macro get the parent node and it's id...
not knowing what type of macro this is...
xslt? usercontrol? razor? the approach would be slightly different.
Hiya thanks for the reply,
sorry should have mentioned that! it's passing into a usercontrol which in essence is a booking form, the pageid tells the form what property the person is interested in if that makes sense.
Cheers
Document d = new Document(PropertyID);int ParentId = d.ParentId;
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Passing Parent Field in Macro
Hi all,
Looking for some help if it's possible!
I need to see if it's possible to pass a parent nodes field value through a macro. The current macro looks this this if run from the parent template
<umbraco:Macro PropertyID="[#pageID]" Alias="ucBookingForms" runat="server"></umbraco:Macro>
But what i need to do is the parent node has a child which runs this macro but needs to still use the pageID of the parent if that makes sense!
In a nutshell it needs to look like this
<umbraco:Macro PropertyID="(parentnode)/[#pageID]" Alias="ucBookingForms" runat="server"></umbraco:Macro>
Cheers all
Pete
still pass in the page Id to the macro as in the original and then in the macro get the parent node and it's id...
not knowing what type of macro this is...
xslt? usercontrol? razor? the approach would be slightly different.
Hiya thanks for the reply,
sorry should have mentioned that! it's passing into a usercontrol which in essence is a booking form, the pageid tells the form what property the person is interested in if that makes sense.
Cheers
is working on a reply...