overriding custom packages?

Permalink
I know we can override various elements in the core but I was wondering if there's a way to override custom installed packages in the root package directory? For example, I have the coreCommerce package but I need to override some view pages with custom mods.

I've been hacking packages to make it work but when I update them, my hacks are of course overridden themselves and I have to do it all over again. I was wondering if there's a more elegant way of doing this?

thanks in advance,

mario

mario
 
mario replied on at Permalink Reply
mario
So I looked at the updated documentation regarding blocks:

http://www.concrete5.org/documentation/developers/blocks/overview...

and I think it states that it's possible to do overrides using the root blocks folder.

I've tried doing this but to no avail.

I'm attempting to do an override on the core_commerce package but neither putting the info into something like this:

/blocks/packages/core_commerce/blocks/product_list/controller.php

or
/blocks/core_commerce/blocks/product_list/controller.php

appears to be overriding the package.

It does work using the exact same structure when I hack the actual file in the packages directory, so I know I'm targeting the right file.

Ideally, I'd like to override other files outside of the package block directory but I thought I'd try to override as described in the Documentation section.

Is this behavior that only works in 5.4 or can it work in 5.3.3.1 as well? Is there another way to do this? Is my pathing off?
Shotster replied on at Permalink Reply
Shotster
Hi Mario,

I think you just want to duplicate exactly what's inside the package's "blocks" directory into your root "blocks" directory. That works for me with other packages.

As for overriding files outside the package's "blocks" directory, I'd like to know how to do that as well. I have the Calendar add-on, and it's not clear how to override the calendar.css stylesheet which resides in a folder in the package's root as opposed to being inside the "blocks" folder.

Anyone know how to go about this?

-Steve
Shotster replied on at Permalink Reply
Shotster
I'm now not so sure about my statement. I thought I could just copy the calendar folder in the calendar package's blocks directory to my root blocks directory and just override everything. It doesn't work, and I don't know why.

:-/

-Steve
mario replied on at Permalink Reply
mario
thanks for the advice steve! i'll let you know if I find out more about this.
Shotster replied on at Permalink Reply
Shotster
For what it's worth, I just learned (from Andrew) that style sheets in a package's css directory can be overridden by placing them in your theme's root directory. (At least it works with the Calendar add-on.)

As for overriding the block itself, I'm still not clear on what the intended behavior is, but simply copying the block from the package to the root "blocks" directory doesn't seem to work. I also encountered an issue with an Ajax call to a tool causing a fatal error. I described what I learned in this post…

http://www.concrete5.org/community/forums/customizing_c5/blocks-chi...

-Steve
mario replied on at Permalink Reply
mario
good to know! and thanks for the other post. interesting.