November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
If you have implemented a custom view engine (like in the Alloy MVC template), you can hook up an additional partial view location format that points to "~/Views/Shared/EditorTemplates/{0}.cshtml". After that you should be able to drop razor views named like the ones from EPiServer in there and customize (take over, really) the rendering without messing about in the EPiServer’s program files folder.
For instance a file named "/Views/Shared/EditorTemplates/InputFragment.cshtml" in your case.
I’m assuming you are using Razor views in your project, but it should be easy to change the view to web forms using .ascx as the file extension if you for some reason really would like to.
Hi All,
Current Days, I am working on Xforms by using Episerver 7 MVC. I have met a few problems and the most difficult thing is how to render xforms correct.
For example, the bold area is what I wanted.
<label title="<%: Model.Title %>">
<%: Html.DisplayFor(model => model.Label) %>
<%: Html.TextBox(Model.Reference, Server.HtmlDecode(Model.Value) ?? string.Empty, new { size = Model.Size })%>
<%: Html.ValidationMessage(Model.Reference)%>
</label>
<label title="<%: Model.Title %>">
<%: Html.DisplayFor(model => model.Label) %>
</label>
<%: Html.TextBox(Model.Reference, Server.HtmlDecode(Model.Value) ?? string.Empty, new { size = Model.Size })%>
<%: Html.ValidationMessage(Model.Reference)%>
I reseach in forums and can only find to the way to rewrite html.displayModel method. But it is hard to rearrange the element on the form.
Then I find in my local path:C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Application\Util\Views\Shared\EditorTemplates. There are some editor templates in the folder and of course we can change its tag and sequence. But if we upgrade to a new version, the files could be override and it is not a good solution.
If you find some useful methods, please give me a sample please.