|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 716 Location: Leigh-on-Sea, Essex, UK
|
Hello all, When passing a property value from the document type into a macro you use this syntax, [#myDocumentTypeProperty]. However I would like to use a document property which is further up the tree, to be used in the macro. To use this property within the template I use the following. <?UMBRACO_GETITEM field="myDocumentPropertyFromAnotherNode" recursive="true"/> I would appreciate any help on how I could resolve this. Thanks, Warren Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 706 Location: Århus, Denmark
|
If it is an sxlt macro, Casey made a great example here: http://forum.umbraco.org/xslt/xslt-tip---display-a-field-recursively/(Remember to read the whole thread...)
Morten Bock - Level 2 certified - My danish blog with a few english posts | CodeGarden on Facebook
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 716 Location: Leigh-on-Sea, Essex, UK
|
Hello Morten, no it's not for an XSLT macro, but a .NET usercontrol which has properties I need to pass to it. macroProperty="[#MyDocumentPropertyAlias]" Does anyone know of a way to use a recursive property for a macro property? Warren Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,038 Location: Charleston, West Virginia, United States
|
Hi Warren, In v.2.1.7, there was an addition of a [$property] command, however, it did not seem to make it into v.3. In your user control, you can iterate through the nodes manually to find one with a value. Case
• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 716 Location: Leigh-on-Sea, Essex, UK
|
Niels/Core team. Is there any possibilty to add [$PropertyAlias] to v3? Thanks, Warren Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
|
|
 Rank: Addict
Joined: 2/19/2007 Posts: 584 Location: Belgium
|
any status change on this ?
Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,038 Location: Charleston, West Virginia, United States
|
Niels is in training classes this week, and probably has not been around much. Maybe next week we will get v.3.0.3....
• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,038 Location: Charleston, West Virginia, United States
|
Well, according to the issue on codeplex, it may not be fixed... http://www.codeplex.com/umbraco/WorkItem/View.aspx?WorkItemId=12284
• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
|
|
 Rank: Fanatic
Joined: 11/24/2006 Posts: 299 Location: Stockholm, Sweden
|
So this means that there is no recursive option for macros that are coded in .NET instead of XSLT?
Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
|
|
|
Guest |