How do I - Use a recursive property in a macro property ? Options
warren
Posted: Sunday, August 19, 2007 11:19:19 AM

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
mortenbock
Posted: Sunday, August 19, 2007 7:24:15 PM

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
warren
Posted: Monday, August 20, 2007 10:04:29 AM

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
neehouse
Posted: Monday, August 20, 2007 1:57:44 PM

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 •
warren
Posted: Monday, August 20, 2007 2:04:33 PM

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
tim
Posted: Friday, August 24, 2007 4:51:11 PM

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
neehouse
Posted: Friday, August 24, 2007 5:01:38 PM

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 •
neehouse
Posted: Friday, August 24, 2007 5:25:34 PM

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 •
tkahn
Posted: Tuesday, May 13, 2008 4:03:28 PM

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
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.