How To Alternatively Theme A Whole Sub-Section Of A Site?

Permalink
Hi Community,

How do you apply a different theme (than the main theme) to a site page and AUTOMATICALLY apply it to all the page existing sub-pages (without having to do the operation manually for each sub-page)?

Thanks for the help

stephanebeck
 
jero replied on at Permalink Reply
jero
I'd take a look at

http://www.concrete5.org/marketplace/addons/mobile-theme-switcher/...

If you were to hack the model/mobile_theme.php, and in the checkLoadTheme() method, check the value of $page->cPath, you could fire off the rest of the code that runs if it's a mobile device for various values of $page->cPath instead.

This assumes that a "section" has a common parent page e.g.
/catalog/marvin-mandarin
/catalog/ruddy-duck

although if you've got some other pattern you could code it here.

// replace if(self::isMobileDevice()) {
       // with:
       if (preg_match('/^\/catalog/',$page->cPath)) {


You might also want to trim out the cookie code, since it's not required.

Ought to do the trick.
stephanebeck replied on at Permalink Reply
stephanebeck
Thanks Jero, it looks a bit complicated but I'll give it a try anyway if I can't find any other more "straight forward" solution.
jero replied on at Permalink Reply
jero
I probably made it sound harder than it is.

Download and install the package to start with.

If you tell me the path of your section, I'll edit the file and attach it.
stephanebeck replied on at Permalink Reply
stephanebeck
Thanks Jero, I'm not at that stage of my project yet but I'll soon be! I'll give a try to your solution and will post the result here on this thread.
CIRESatCU replied on at Permalink Reply
Has anyone got a clue about this in the current version of Concrete5? I'm using concrete5 5.6.2.1 and that plugin that was suggested doesn't work with this version of Concrete.

Any help would be great:) Thanks!