Cannot create custom theme classes
Permalink
I'm currently wrestling with another issue (http://www.concrete5.org/community/forums/themes/cannot-redeclare-class-upon-installing-a-custom-theme/#678841) for which I've created a simple workaround (define a constant and check for its existence, because for some reason page_theme.php is getting parsed twice)
However upon working around this issue I've run into a new one. I added the following to my page_theme.php:
and the CSS:
I tried uninstalling and re-installing my theme but the class is simply not available. The only option I get when selecting a class for the Main content area is "None". I tried adding a print statement to the top of the getThemeAreaClasses() function and this print statement is never run -- getThemeAreaClasses() is never called.
Why is this happening?
However upon working around this issue I've run into a new one. I added the following to my page_theme.php:
and the CSS:
.im-blue-da-bu-dee { background-color:#00f; }
I tried uninstalling and re-installing my theme but the class is simply not available. The only option I get when selecting a class for the Main content area is "None". I tried adding a print statement to the top of the getThemeAreaClasses() function and this print statement is never run -- getThemeAreaClasses() is never called.
Why is this happening?
This works for me. I just have to flip to the core Elemental theme and back again to my custom theme and the new classes show up. Do you have all your c5 caching turned off ?
After applying your solution tohttp://www.concrete5.org/community/forums/themes/cannot-redeclare-c... suddenly it started working. Was just a simple improper namespace