5.7 Custom templates not being found
Permalink
I've just started playing with 5.7 - been waiting for the internationalisation dev to finish - and I've come across a problem with custom templates.
The old way, with 5.6, was to reproduce the directory tree in the "Blocks" directory, and drop your file into it, to which you gave the name of your template (home-nav.php for example).
This does not work for me. I know you now go to the "application/blocks" and build your tree from there, but it doesn't work. I noticed that many templates sit in their own directory (called the template name) and are called view.php. Tried that - doesn't work.
I've found out that the Switch Languages block has two templates in their template folder. Neither of these are found when I look for a custom template when editing the block.
Any ideas what's happening?
And more importantly what to do about it.
The old way, with 5.6, was to reproduce the directory tree in the "Blocks" directory, and drop your file into it, to which you gave the name of your template (home-nav.php for example).
This does not work for me. I know you now go to the "application/blocks" and build your tree from there, but it doesn't work. I noticed that many templates sit in their own directory (called the template name) and are called view.php. Tried that - doesn't work.
I've found out that the Switch Languages block has two templates in their template folder. Neither of these are found when I look for a custom template when editing the block.
Any ideas what's happening?
And more importantly what to do about it.
Hi NickKN,
Is this a new install?
What version of concrete5?
Is this a new install?
What version of concrete5?
It's a local, development installation.
Version 5.7.5.2 ( the latest version, if I've got the numbers wrong !)
Version 5.7.5.2 ( the latest version, if I've got the numbers wrong !)
Have you tried creating an additional install to see if you experience the same issues?
To clarify, do your block template paths look like this?
Example:
application\blocks\autonav\templates\special_template\view.php
application\blocks\autonav\templates\special_template.php
To clarify, do your block template paths look like this?
Example:
application\blocks\autonav\templates\special_template\view.php
application\blocks\autonav\templates\special_template.php
I've tried both !
First I did the old, 5.6 way - giving the file the name of the template, then I changed it to folder (name of template)/view.php
Also, as I noted above, it doesn't pick up addons in the packages directory when I open the "extend" page.
How does concrete parse the directory tree to find overrides etc. ?
First I did the old, 5.6 way - giving the file the name of the template, then I changed it to folder (name of template)/view.php
Also, as I noted above, it doesn't pick up addons in the packages directory when I open the "extend" page.
How does concrete parse the directory tree to find overrides etc. ?
I wonder if there's not a file corrupted in the download.
I tried a fresh install and, instead of the setup/installation page, I get a blank page... so I downloaded another copy of Concrete5 and tried again - with the same effect.
Or there could be something with permissions or something... Linux can be a bit weird about that...
Otherwise I'm at sea with this
My local install of 5.6 still works as expected.
I tried a fresh install and, instead of the setup/installation page, I get a blank page... so I downloaded another copy of Concrete5 and tried again - with the same effect.
Or there could be something with permissions or something... Linux can be a bit weird about that...
Otherwise I'm at sea with this
My local install of 5.6 still works as expected.
I am having the exact same problem as you. I have no idea how to style the autonav in 5.7. I have put the original autonav view.php to application\blocks\autonav\templates\view.php and it doesn't change nothing.
I will follow this thread and hope that we will find a solution to this.
Regards,
erminos
I will follow this thread and hope that we will find a solution to this.
Regards,
erminos
This might be something obvious you've already tried, but have you got caching on?
Have you tried clearing your cache?
Have you tried clearing your cache?
No caching - it's a local development installation.
The critical cache for templates is the c5 override cache. Until the override cache is cleared, no templates or any other form of override will be recognised.
I've verified
All caching is off
All caching is off
@NickKN
Did you verify the MD5 checksum of the download?
(MD5: 61e48a8d4bf281a25420c3d2186a1a3d)
@erminos
"I am having the exact same problem as you. I have no idea how to style the autonav in 5.7. I have put the original autonav view.php to application\blocks\autonav\templates\view.php and it doesn't change nothing."
I don't believe your example would work. The view.php file would need to be in a named folder.
Example:
application\blocks\autonav\templates\special_template\view.php
application\blocks\autonav\templates\special_template.php
Did you verify the MD5 checksum of the download?
(MD5: 61e48a8d4bf281a25420c3d2186a1a3d)
@erminos
"I am having the exact same problem as you. I have no idea how to style the autonav in 5.7. I have put the original autonav view.php to application\blocks\autonav\templates\view.php and it doesn't change nothing."
I don't believe your example would work. The view.php file would need to be in a named folder.
Example:
application\blocks\autonav\templates\special_template\view.php
application\blocks\autonav\templates\special_template.php
Checksum is right
But that doesn't preclude the possibility that there's something wrong with a file in the archive...
But that doesn't preclude the possibility that there's something wrong with a file in the archive...
Thank you very much MrKDilkington, now I can choose the block as a custom template but now i have no idea what is the best way to style the autonav. I had a look at the elemental theme for the styling and it is under application\files\cache\css\elemental\main.css.
What is the best way to style my custom template?
What is the best way to style my custom template?
You should ask that on a separate thread and mark MrKD's post above as best answer on this thread.
It WAS a permission thing !
There's me trying to do the right thing and only use a privileged account to administer the computer and have an ordinary one for everything else...
There's me trying to do the right thing and only use a privileged account to administer the computer and have an ordinary one for everything else...
I don't know what or how the directory tree is parsed but something is going wrong.