Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Hi, short answer, CustomTag is only used in edit mode for MVC.
Joel has extensively explaine the renderings:
http://joelabrahamsson.com/episerver-7-and-mvc-custom-tags-and-css-classes-when-rendering-properties/
http://joelabrahamsson.com/episerver-7-and-mvc-how-to-customize-rendering-of-properties/
http://joelabrahamsson.com/how-episervers-html-helper-propertyfor-works/
(see the last articles EditAttributes usage, that might be the closest you are looking for maybe)
Hi Antti, yes i've read the excellent articles by Joel, using the EditAttributes is not sufficient because it still writes out the tag even if the property is empty.
I'm looking for a method where the tag is not rendered if the property is empty.
Hi, I have used helper methods that take care of the rendering, for example if the heading is empty, then don't render the <h2>....</h2> otherwise render, but this means you need to write more code and logic compared to the built in methods.
When using the following code
the CustomTag property is written out while in Edit Mode, why doesn't it write out the tag in ViewMode?
Should I use a different property to write out the tag in ViewMode?