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
I have some global settings that I want to store (e.g. footer text, etc). This will differ from site to site, and will sometimes be html... e.g.:
<div itemscope itemtype="http://schema.org/Organization"> <p> <span itemprop="name">Company</span><br /> <!-- START POSTAL ADDRESS --> <span itemscope itemprop="address" itemtype="http://schema.org/PostalAddress"> <span itemprop="streetAddress">123 Any Street</span><br /> etc...
I could, of course, hard code it into the template, but it will be far easier for the site admin to change it as content in the global settings node.
I am using a text area, but the output from model.content.footerArea01 has been automatically escaped (e.g. > instead of <)...
model.content.footerArea01
>
<
Is a textarea the correct datatype for this content? If so, how do I prevent it from being automatically escaped? If not, what should I use?
Hi Ault,
Use the following
@Html.Raw(model.content.footerArea01)
Cheers,
Marc
Excellent! thanks v. much.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
store html
I have some global settings that I want to store (e.g. footer text, etc). This will differ from site to site, and will sometimes be html... e.g.:
I could, of course, hard code it into the template, but it will be far easier for the site admin to change it as content in the global settings node.
I am using a text area, but the output from
model.content.footerArea01
has been automatically escaped (e.g.>
instead of<
)...Is a textarea the correct datatype for this content? If so, how do I prevent it from being automatically escaped? If not, what should I use?
Hi Ault,
Use the following
@Html.Raw(model.content.footerArea01)
Cheers,
Marc
Excellent! thanks v. much.
is working on a reply...