Custom template as default globally for a block
Permalink 1 user found helpful
Hi!
Is there a way to set a custom template as default? So every time the client insert for example a gallery block, it uses a custom template without selecting "custom template" and choosing the appropriate one?
I may have read something about this a long time ago, but I can't find it in the forums.
Thanks in advance.
Is there a way to set a custom template as default? So every time the client insert for example a gallery block, it uses a custom template without selecting "custom template" and choosing the appropriate one?
I may have read something about this a long time ago, but I can't find it in the forums.
Thanks in advance.
Does this works with packages too?
Yup!
Don't forget to mark the above as an answer if it helps.
Job.
Don't forget to mark the above as an answer if it helps.
Job.
Thanks!
This is not working for me from within a package.
I can override the view.php if I place my custom template within root/blocks folder but not within my package/blocks folder.
I can only change the view from within my package if I create a custom template (templates folder) and then manually change the template of the block on my site.
I would much rather prefer to override the default block views with my packaged theme.
Any advice?
I can override the view.php if I place my custom template within root/blocks folder but not within my package/blocks folder.
I can only change the view from within my package if I create a custom template (templates folder) and then manually change the template of the block on my site.
I would much rather prefer to override the default block views with my packaged theme.
Any advice?
I am also not able to set a template view from within my package if I use this structure:
my_package/blocks/tags/templates/my_template/view.php
The template does display if I use:
my_package/blocks/tags/templates/my_template.php
There seems to be some issue with using files called "view.php" when trying to override within my package.
my_package/blocks/tags/templates/my_template/view.php
The template does display if I use:
my_package/blocks/tags/templates/my_template.php
There seems to be some issue with using files called "view.php" when trying to override within my package.
I don't have the Gallery block, but if you were wanting to do this with the autonav block ...
/siteroot/blocks/autonav/view.php
In that file, copy the contents of your template, and that'll be used as the default throughout the site.
This method of overriding is standard throughout Concrete and can be done with controllers and models as well as views.
Be sure to mark this reply as an answer if it helps you ...
Job.