this is probably a silly question but I want to render an email (mailto:) link on the contact us page so that the email address comes from the umbraco document type field.
Of course the most straight forward approach for me was to write it this way:
Which of course is totally incorrect. How do I avoid this from happening? Do I need to be escaping double quotes in href or something? How would I do that?
In the dialogue when inserting the umbraco:item you can select something to insert before and after the field. That should let you create the opening link tag
How to render href from a document property?
Hi guys,
this is probably a silly question but I want to render an email (mailto:) link on the contact us page so that the email address comes from the umbraco document type field.
Of course the most straight forward approach for me was to write it this way:
<div><strong>Email:</strong> <a href="mailto:<umbraco:Item field="email" stripParagraph="true" convertLineBreaks="true" runat="server"></umbraco:Item>"><umbraco:Item field="email" stripParagraph="true" convertLineBreaks="true" runat="server"></umbraco:Item></a></div>
However this renders like so in HTML:
Which of course is totally incorrect. How do I avoid this from happening? Do I need to be escaping double quotes in href or something? How would I do that?
Thanks in advance guys!
Just a note, I'm doing all this within a template, I would rather not write a macro for something this trivial if it can be avoided.
Thank you.
In the dialogue when inserting the umbraco:item you can select something to insert before and after the field. That should let you create the opening link tag
Great, thank you for your help!!!
is working on a reply...