Override package theme template?

Permalink 1 user found helpful
I've looked around the forums and see a few threads about overriding various package items in your site, and in general it seems that some things can be overridden and some cannot. But I haven't seen any mention of whether or not this is the case for page type templates.

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.

Thanks.

jordanlev
 
LucasAnderson replied on at Permalink Reply
LucasAnderson
Did you ever figure this out? I'm working on a project where this would potentially be needed.
jordanlev replied on at Permalink Reply
jordanlev
No I never did.

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.

:(
LucasAnderson replied on at Permalink Reply
LucasAnderson
Which sucks because if the package gets updated, your mods are gone. That makes me a sad panda. :(
Mnkras replied on at Permalink Reply
Mnkras
oh noes! sad Panda! +1 to the idea aswell
jordanlev replied on at Permalink Reply
jordanlev
Yeah, and just for the record, the two issues I ran into were:

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 :)
andrewpietsch replied on at Permalink Reply
Hi all,

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