Theme Bug?

Permalink
I am having a problem where all single pages are defaulting to the core theme instead of the selected theme in themes. Even trying to manually set the theme for the page using sitemap has no effect. This is very troublesome because The C5 'bar' (no buttons) is appearing throughout those pages.

screenshot:http://imagebin.org/33415

anybody have any idea?

DavidMIRV
 
DavidMIRV replied on at Permalink Reply
DavidMIRV
I have traced this down to my single page being named the same as the orginal registration page. But I removed the original one before I added the new on in the top level concrete directory... Why does it still pick it up as system?
andrew replied on at Permalink Reply
andrew
There is a programmatic way to set theme by path (which we don't use too often but we use for some system pages.) Try checking out

config/site_theme_paths.php

and

concrete/config/theme_paths.php

In the latter you've got stuff like

<?php $v->setThemeByPath('/register', VIEW_CORE_THEME);
?>


If you override that particular directive in the local file, you can set the theme to whatever you want.

The second parameter is the handle for the theme, its directory name.
DavidMIRV replied on at Permalink Reply
DavidMIRV
Thanks alot andrew works like a charm. I was on the path to doing something simular last night $controller->setTheme(), though it does not want to work. No biggie though your method works great..
DavidMIRV replied on at Permalink Reply
DavidMIRV
Hey I just noticed that although I overrode the theme the css won't load due to constants not being defined...

e.g. in my view this shows up

<!-- Site Header Content //-->
<style type="text/css">@import "REL_DIR_FILES_THEMES_CORE/default/main.css";</style>
<style type="text/css">@import "REL_DIR_FILES_THEMES_CORE/default/typography.css";</style>


instead of the full paths ? Strange
andrew replied on at Permalink Reply
andrew
Are you still having this problem? Mind pasting in the content of your site theme paths file and the name of your custom theme ?
DavidMIRV replied on at Permalink Reply
DavidMIRV
I have simply overrode the /registration page(s) to use the default theme instead of the core theme (to get rid of the C5 'bar'). Nothing special to paste here. It appears to be something directly related to SinglePages only though which has lead me to believe that there is some kind of config not being loaded for them which should be?
andrew replied on at Permalink Reply
andrew
If I do this:

$v->setThemeByPath('/register', "greensalad");


I get to the proper theme, it looks ok.

What theme are you trying to override the main theme with? Is it installed? What directory is it in?
jpabellon replied on at Permalink Reply
jpabellon
When I try to override the default theme for system pages I get this:

Call to a member function getCollectionID() on a non-object in area.php on line 106
jpabellon replied on at Permalink Reply
jpabellon
It seems it has trouble with editable areas within the theme. Everything in the theme should be static for this to work.