What is the scenario for needing to insert HTML snippets?
The RTE is not the way to go about it imho - But you should be able to somply use a textbox multiple property editor, where you just paste the HTML and then render it using Razor, Umbraco.Field or however you render your pages.
The scenario is that I am using a bootstrap based template, and me and the people editing the content on the site, need to "find our legs" with the new css classes.
Instead of spending a lot of time creating special template pages, I will start out by creating layout page, with a single content property, where I can simply enter an HTML fragment.
I will need to enter divs and other HTML tags. Wont the textbox-multiple strip div tags?
Ok, in that case I don't recommend using the approach described above.
You should consider using partial view macros instead, which will render for instance a navigation block or other page components like the header, footer etc. depending on what your site architecture is.
Static HTML in property
Hi - I am in the proces of designing a new umbraco 7 site.
What I would like to have, is the ability to enter a raw HTML fragment in a property on a document type instance.
Does anyone know how this can be done?
I have often battled with the RTE but frankly I hate it. It keeps modifying the HTML I enter.
Kind regards
Thomas
Hi Thomas
What is the scenario for needing to insert HTML snippets?
The RTE is not the way to go about it imho - But you should be able to somply use a textbox multiple property editor, where you just paste the HTML and then render it using Razor, Umbraco.Field or however you render your pages.
/Jan
Hi Jan - thanks for the reply.
The scenario is that I am using a bootstrap based template, and me and the people editing the content on the site, need to "find our legs" with the new css classes.
Instead of spending a lot of time creating special template pages, I will start out by creating layout page, with a single content property, where I can simply enter an HTML fragment.
I will need to enter divs and other HTML tags. Wont the textbox-multiple strip div tags?
Thomas
Hi Thomas
Ok, in that case I don't recommend using the approach described above.
You should consider using partial view macros instead, which will render for instance a navigation block or other page components like the header, footer etc. depending on what your site architecture is.
Maybe you can benefit from watching some of the Razor videos on umbraco.tv here http://umbraco.tv/videos/umbraco-v7/implementor/working-with-umbraco-data/razor-syntax/introduction-to-razor/
You can also learn more about Razor based macros here http://our.umbraco.org/Documentation/Reference/Templating/Macros/Razor/index
/Jan
Hi Jan - many thanks for the links. :-)
Thomas
is working on a reply...