This project is read-only.

Hide Auto route part in create/edit mode

Topics: Writing modules
May 30, 2012 at 11:17 AM

Hi, I have created a content type named "Product" which has AutoRoute part in it. Now I want to keep this autoroutePart as the part of content type but does not want to show to the admin user.(Admin user is very much confused with this and he has once set a product as home page.)

How can I hide this autoroutepart from editor

I tried this but does not work


<Match ContentType="Product" DisplayType="DetailAdmin">
    <Place Parts_Autoroute_Edit="Nowhere"/>

and then this


<Match ContentType="Product">
    <Place Parts_Autoroute_Edit="Nowhere"/>

May 30, 2012 at 6:10 PM

Have you tried to override the rendering by copy-pasting this file "src\Orchard.Web\Modules\Orchard.Autoroute\Views\EditorTemplates\Parts.Autoroute.Edit.cshtml" into /Themes/TheAdmin and altering it ?