Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Override EditorForModel Template

You can provide alternate templates for individual types, but is it possible to override the template that wraps the label, field and validation up.

Change:

<div class="editor-label"><label for="Content">Content</label></div>
<div class="editor-field"><input class="text-box single-line" id="Content" name="Content" type="text" value="" /> </div>

To:

<div class="field">
<label for="Content">Content</label>
<input class="text-box single-line" id="Content" name="Content" type="text" value="" /> </div>

Rich

like image 925
kim3er Avatar asked Oct 27 '09 10:10

kim3er


1 Answers

You can write an Object.ascx template and perform your own logic.

like image 86
Haacked Avatar answered Sep 25 '22 19:09

Haacked