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
<umbraco:Macro Subject="Website Enquiry Form" YourEmail="@{Model.contactEmailAddress}" Alias="gdg.ContactForm" runat="server"></umbraco:Macro>
What would be the best way to fill the "YourEmail" value, the way I am trying using razor does not work when written into an Umbraco template.
You don't need to pass it in as a macro parameter, in your contactform Razor script, just use @Model.contactEmailAddress to get to that value.
The contact form is actually a plain asp.net user control. I was hoping I could do the heavy lifting of grabbing that value to pass to the user control rather than the deal with it in the user control.
In that case you can probably use this:
YourEmail="[#contactEmailAddress]" //only on current page
or this
YourEmail="[$contactEmailAddress]" //recursive value
See this wiki for more info: http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax
Jeroen
Perfect with the recursive one. Thankyou very much. Learning a little more each day with the help of you guys.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting value for macros using razor
<umbraco:Macro Subject="Website Enquiry Form" YourEmail="@{Model.contactEmailAddress}" Alias="gdg.ContactForm" runat="server"></umbraco:Macro>
What would be the best way to fill the "YourEmail" value, the way I am trying using razor does not work when written into an Umbraco template.
You don't need to pass it in as a macro parameter, in your contactform Razor script, just use @Model.contactEmailAddress to get to that value.
The contact form is actually a plain asp.net user control. I was hoping I could do the heavy lifting of grabbing that value to pass to the user control rather than the deal with it in the user control.
In that case you can probably use this:
or this
See this wiki for more info: http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax
Jeroen
Perfect with the recursive one. Thankyou very much. Learning a little more each day with the help of you guys.
is working on a reply...