orchardcms - How, if at all, can we hide an InputField's DisplayName property with placement.info? -


if want hide displayname property of inputfield, can override inputfield's default template in our theme. works. said, there way use placement.info same?

the following works rather use placement.info more concise solution.

the default inputfield template.

@using orchard.fields.settings; @using orchard.utility.extensions; @{     string value = (string)model.contentfield.value;     if (!string.isnullorempty(value)) {         string name = model.contentfield.displayname;     <p class="text-field">@t(name): @value</p>     } } 

our theme's inputfield template.

@using orchard.fields.settings; @using orchard.utility.extensions; @{     string value = (string)model.contentfield.value;     if (!string.isnullorempty(value)) {     <p class="text-field">@value</p>     } } 

you've found standard way of modifying rendering of field. note may use alternates such 1 includes name of field, if want target rendering of particular instances. placement won't of here, except if need introduce additional alternates based on placement match, in case, you'll have use modified template. reason why placement can't used here label not content shape in , such can't targeted placement.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -