Closed nanduni-nin closed 8 years ago
I think it would be better to have an actual command line option to select which templates to render. So the implementation would need to do the following:
--templates
to the view
sub command. This should take the name of the set of templates which is used to render the web site. It should default to the name of the current default template. This doesn't have a name yet. I would propose to name it one-column
.view
directory. So the files currently under view
should be under view/one-column
.view/two-column
where the templates for the new layout will be stored. As a first step you can just copy the files from the current templates (maybe modify their content in some way to be distinguishable from the original ones). When the option --templates=two-column
is given when running inqlude view
it should render the web pages with the templates from this directory.View#create
check the templates directory for files with the *.haml
extension and only render the files which it finds. This would allow to have different sets of files for different templates. Then you could also create a small dummy template which just renders a simple static page, or a list of all the libraries or something like that.Don't forget to write unit tests for the code you write and integration tests for the command line option.
Add an option to inqlude view command to render alternative templates of the views inside a new folder
temp_views
. This can be used to implement the changes to the web site without making them to be used in production immediately.