Rename view.php in a custom template...

Permalink
I am having problems with some custom templates I have installed on a block. The view.php files seem to overlap each other. I am just wondering if it's possible to rename the view.php file in each different template? Thanks.

Cyberdave
 
SVijay replied on at Permalink Reply
SVijay
Please visit the link

http://www.concrete5.org/community/forums/customizing_c5/contributi...

and follow the instructions
Cyberdave replied on at Permalink Reply
Cyberdave
I have had a look at that thread and it says view.php can be renamed to whatever I want. I have named it the same as the template folder, eg. Template is called sidebar_lotto, so I've renamed the view.php to sidebar_lotto.php but it isn't working. Do I need to change the name somewhere else as well?
TheRealSean replied on at Permalink Reply
TheRealSean
When you rename the view.php make sure it is within a folder called templates inside the block you wish to create the template for,

ie
blocks>autonav>templates>side_nav.php

this is in your root folder not the concrete folder,
concrete>blocks>autonav>templates>breadcrumb.php

If you change the view.php in the main block you will be changing every default instance of that block. Which I assume is what you are finding?
If you just rename the file without moving it into templates it will not be found.

If you do move the view.php into the templates folder make you move it into a custom folder,

ie
blocks>autonav>templates>side_nav/view.php

Regards