This project is read-only.

ability to modify template in shape tracer

Topics: Customizing Orchard
Nov 4, 2012 at 10:31 AM

working in the shape tracer  i had an idea which i would like to share and get opinions. 

would'nt it be great if  within shape tracer , in the Template pane,  there were 3 option buttons ''edit'' , ''save'' ''cancel'' so that you can edit and save the code template within the browser. 

I know many will go ''ouch , there will be a security issue here'' and i agree , but it could be covered using a permission or something like that.

but think about the productivity benefits here. instead of going back and forward from browser to visual studio just click edit , change the code within template panel , save and refresh.

This would be , of course , for minor tweaks and especially usefull for the designer guy/gal who will not need to know anything about visual studio to make subtle changes. 

I would like to look into this more , but would like opinions if i'm missing something that would make me think later ''Gosh, that was a foolish idea''




Nov 5, 2012 at 7:10 AM

There is actually no security issue there, if it's done properly, I think. The problem is different: it's that in a web farm environment, it just wouldn't work as modifying or adding a file would only happen on one machine in the farm, or you'd have to replicate the changes. So the solution really is to store those alternates in the database and have something like Piotr's Razor module that enables dynamic templates. But then the problem with that is that the changes in question get harder to deploy as part of a theme.

I'm not entirely against the idea, but it should be made very, very clear that this should only be used on a dev machine and not in production.