|
|
Rank: Devotee
Joined: 10/30/2007 Posts: 95 Location: Israel
|
Hi, Consider the following template code: Code:<?UMBRACO_MACRO macroAlias="HC_MyMacro" mID="[@mID]"></?UMBRACO_MACRO> This is a template for Doc2, which is the child of Doc1. Doc1 has mID set, Doc2 has no mID at all. What [@mID] will be passed? my guess is 0, right? so how can I make it recursive, or at least to read the value from its parent? Thanks in advance. Itamar.
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,076 Location: Charleston, West Virginia, United States
|
Hi Itamar, [@mID] is pulling a query string value. Beyond that, what type of macro are you creating? XSLT, user control, python? In v.3, recursive macro properties do not exist the way that you are attempting, but can be obtained through programming.
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
Rank: Devotee
Joined: 10/30/2007 Posts: 95 Location: Israel
|
Thanks for your reply.
I'm using 3.0.5. I have an XSLT macro, and I want to get a document field for the current document or its parent. How would I do that then? I was sure [@mID] will get a document field (from a docuemt type)?
Itamar.
|
|
Rank: Devotee
Joined: 10/30/2007 Posts: 95 Location: Israel
|
I was wondering what are my options with v3.0.5 to pass a page field recursively to a macro from a template, e.g. if I have PageB which is under PageA, and PageA has ClientID defined which PageB doesn't I want the macro PageB's template is calling to have that value as a paramer.
Please advise - let me know if any clarifications are required.
Itamar.
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,831 Location: MA, USA
|
|
|
Rank: Devotee
Joined: 10/30/2007 Posts: 95 Location: Israel
|
Thanks doug, only noticed your reply now, due to the stupid mailing component this forum uses...
Itamar.
|
|
|
Guest |