Macro: How do I grab document node properties and use them for my macro properties Options
warren
Posted: Tuesday, September 26, 2006 1:50:10 PM

Rank: Addict

Joined: 7/19/2006
Posts: 752
Location: Leigh-on-Sea, Essex, UK
Hello all,<br/>
I have a contact form Macro that is using a .NET usercontrol. The macro has properties which configure the contact form. At the moment the properties are hard coded in the template. Is there a way I can use the document nodes properties to allow the client to configure the contact form easily??<br/>
Below is what I thought of but it does not work.<br/>
<br/>
<?UMBRACO_MACRO macroAlias="ContactForm" EmailTo="<?UMBRACO_GETITEM field="EmailTo"/>"></?UMBRACO_MACRO><br/>
<br/>
Can anyone help me please??<br/>
Warren

Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
jonwhiteside
Posted: Tuesday, September 26, 2006 2:09:50 PM
Rank: Newbie

Joined: 8/15/2006
Posts: 5
Hi Warren,

I believe you can use the following:

<?UMBRACO_MACRO macroAlias="ContactForm" EmailTo="[#EmailTo]" />

as described in the article: http://en.wikibooks.org/wiki/Umbraco/Samples_and_Articles/Dot_Net_Controls/Using_Page_Properties_In_UserControls

Hope that helps,
Jonathan
warren
Posted: Tuesday, September 26, 2006 2:16:47 PM

Rank: Addict

Joined: 7/19/2006
Posts: 752
Location: Leigh-on-Sea, Essex, UK
Thanks I just found that 5mins after I posted this.

Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
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.