We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Problems with cascading CP themes

Development and Programming

Rob Sanchez's avatar
Rob Sanchez
335 posts
15 years ago
Rob Sanchez's avatar Rob Sanchez

I was under the impression that the CP cascading feature extended to the view files as well.

I created a new folder in my cp_themes folder called test. I copied just homepage.php from the default theme to my new theme. So now my theme contains one file: homepage.php. Now if I select the test theme as my CP theme and go to the homepage, I get an error:

Unable to load the requested file: _shared/header.php

So it seems to me that calling a load->view inside a loaded view should continue to cascade, that is look for it in my folder, and if it’s not there go to the default folder. But instead I get an error.

Experiment 2. Delete my homepage.php, create a _shared folder, and create one file in there called main_menu.php. So now I would expect the default homepage view to load, with my custom _shared/main_menu.php. It does not, it loads the default main_menu.

I think this can be traced back to the way you handle _ci_view_path when it’s an array. At some point that array isn’t available to subsequent load->view’s. I also notice that some images are missing, for instance the homepage icon in the top nav.

What’s unclear to me, is whether I misunderstood and am therefor not using them correctly.

       
Brandon Jones's avatar
Brandon Jones
5,500 posts
15 years ago
Brandon Jones's avatar Brandon Jones

Hey Rob, which version of EE are you on? If you don’t mind, please file a bug report. That should work, and this may be a regression as I can reproduce it in our development build.

       
Rob Sanchez's avatar
Rob Sanchez
335 posts
15 years ago
Rob Sanchez's avatar Rob Sanchez

I’m on EE 2.1.4. I’ll file a bug report, just wanted to check here first that it is, in fact, a bug. Thanks 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.