Search code examples
c#orchardcms

Orchard Element Alternates


We have couple of Elements hosted on a Module . and we have couple of themes .

each Element already include some alternates . deciding which one to render is done by the DisplayType on the ElementDriver Editor result .

example : MyElement-Xtype is an alternate of MyElement with the display type Xtype .

we want to move all our templates of Elements on the Elements Folder (Views/Element) .

to the Template View Folder .

so we want to make the Element Driver looks for the template in MyTheme/Views/Elements instead of MyModule/Views/Elements .

Why ? why not just include the elements to the theme ?

cause the element will be shared between themes . so when a theme is activated it will take the view of the current Theme

how can i Achieve this ?


thanks!


Solution

  • just figured it out since i tried it but it didn't work . cause my theme was not enabled . this is already configured . Orchard will take the Element template in the Module If the template on the theme does not exist .

    its good to speak your problems tho .