Override package theme template?1 user found helpful
I am trying to override a page type template for a theme that was installed via a package, and it appears as though I cannot override them by copying to my site's themes/themename/ folder -- I have to edit the file in the package theme directory.
So just want to see if this is truly the case, or if I'm missing something.
Funny you should mention this now -- I am working on a big project right now and running into crazy amounts of pain because it seems that things in packages are just not overridable in that many situations, or they are but it's really wonky.
1) Any calls to $this->inc() in a block's add.php or edit.php files will fail if a directory having the block name exists in the /blocks/ directory, because it looks for the included file in the /blocks/BLOCKNAME directory, instead of /packages/PACKAGENAME/blocks/BLOCKNAME like it should. What this means is that if I have a custom template for a package's block, I cannot edit the block unless I temporarily rename the /blocks/BLOCKNAME directory so C5 doesn't know it's there.
2) Hard-coding a global scrapbook block into a page type template (via Block::getByName('Footer About')->display();) and then choosing a custom template for that block does NOT load any related assets for custom template (view.css, js files, etc.).
I should go report these as bugs now that I've typed them up :)
I've been running into similar issues trying to get a packaged theme to provide overrides for blocks in another package (with no manual intervention).
I've been able to get this to work and think it might be possible to take it further (i.e. allow packages to override default block views as well).
I've posted to the forums and would love to know any thoughts on this (both good & bad) . The post ishttp://www.concrete5.org/community/forums/customizing_c5/proposal-t...
Thanks & cheers