Is there any way to manage the shape templates other then the default location (Such as placing them inside sub-folders)?

184 views Asked by At

I'm developing an Orchard Core site and would like to place the shape templates into some sort of folder structure, if possible?

See example from tutorial:

enter image description here

So would it be possible to place the ColorField shape templates into a ColorField folder and the PersonPart shape templates into a PersonPart folder?

1

There are 1 answers

0
REMESQ On

Not a direct answer to your question, but I was having problems getting Razor pages in a ~/Views/Shared folder to display as a shape.

JTKech replied here to me https://github.com/OrchardCMS/OrchardCore/issues/6376?notification_referrer_id=MDE4Ok5vdGlmaWNhdGlvblRocmVhZDkyNDcxMjQ2NDo3MjcwNjE%3D#issuecomment-640995088. Basically, OC looks at certain folders ("Views", "Views/Items", "Views/Parts", "Views/Fields", "Views/Elements") to display shapes.

That being said, there was a way in O1 to change what folders were searched, and I believe there is such a way in OC but haven't been able to find it.

In the end, you may want to place Color Field and PersonPart into ~/Views/Parts until you find a better solution to suit your needs.

Another option is to create a Theme and place those files within a similar structure there. I tend to do this with front-end views, keeping the Admin/Edit pages in my module. But there's nothing to stop you from doing them either way. Good luck.