Custom template and duplicate view.php
Permalink
When i create custom template I always need to duplicate all the code of the original view.php (Suppose i want to use most of the core block)
Vars declaration part for example. In "application/blocks" folder i can use vars from "concrete/blocks" without declaring them again in view.php?
Vars declaration part for example. In "application/blocks" folder i can use vars from "concrete/blocks" without declaring them again in view.php?
If I was doing this in plain PHP (i.e. not in Concrete5) I would create the variables as global vars in a separate PHP file which could then be included into more than one template. The variables need to be globals for you to reference them in the templates (outside the scope of the included file).
I think you can do something similar in Concrete5 which has its own method for including files. This page might give you some clues:
http://documentation.concrete5.org/developers/designing-for-concret...
Please let me know if you figure it out :-)