title: Problem with MVC EditorFor named template
body: <p>I have what appears (to me anyway) to be a strange problem...</p>
  
  <p>I created a simple editor template for a SelectListItem (SelectListItem.cshtml in the ~/Views/Shared/EditorTemplates folder), for example:</p>
  
  <pre><code>&lt;ul class="select-list-item cell-15 col-3 omega clearfix"&gt;
      @Html.EditorFor(c =&gt; c.Categories)
  &lt;/ul&gt;
  </code></pre>
  
  <p>Where c.Categories is an IEnumerable</p>
  
  <p>This worked fine, but I wanted another template to render the collection with slightly different markup, so I copied and renamed the editor template to, for example, 'CategoryIcons.cshtm' and invoked as follows:</p>
  
  <pre><code>&lt;ul class="select-list-item cell-15 col-3 omega clearfix"&gt;
      @Html.EditorFor(c =&gt; c.Categories, "CategoryIcons")
  &lt;/ul&gt;
  </code></pre>
  
  <p>In short, the only difference is I'm specifying a named editor template.</p>
  
  <p>When I open the page, I now get the following error:</p>
  
  <blockquote>
    <p>The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[System.Web.Mvc.SelectListItem]', but this dictionary requires a model item of type 'System.Web.Mvc.SelectListItem'</p>
  </blockquote>
  
  <p>The template's model declaration, in both templates id:</p>
  
  <pre><code>@model System.Web.Mvc.SelectListItem
  </code></pre>
  
  <p>I don't understand why the default template works and the named template doesn't.  Any help would be appreciated.</p>
  
  <p>Thanks.</p>