Cannot set theme for single page

Permalink 1 user found helpful
I made a new single page, the file is in webroot/single_pages and it's added in the Dashboard >Pages..> Singe Pages. Now I want to use the layout and css from myTheme for this page. In site_theme_paths.php I added $v->setThemeByPath('/myPage', "myTheme"); and added a template-page with the same name in the myTheme directory. However, the singe page shows up without any style formatting, not of myTheme and neither of the default concrete5 style. It ignores the template file as well.
I did the same for the already existing login and register page and those work fine. Why can't I style my own made single pages? Please help!

View Replies:
jordanlev replied on at Permalink Reply
jordanlev
I don't think you need the $v->setThemeByPath() call for a single_page that's in your webroot/single_pages directory (unless it's a dashboard page you're making, which it doesn't sound like it is).

Also, you can't have a single_page with the same name as a theme template file -- the system will get very confused. Instead, you just need to have a "view.php" file in your theme, and somewhere in that file is "print $innerContent" (or maybe "echo $innerContent" -- they do the same thing). Now whatever you output in the single_page gets put into that $innerContent variable, and this is how it gets wrapped in your theme.
marshe replied on at Permalink Reply

Thank you for your reply. The problem is it does not take the view.php from my theme directory and neither the custom template I made (I want to use a custom template, because I need more than one wrapper for single pages). It does not work either when I remove the custom template (so it should take the view.php), it just shows the 'inner content', not wrapped in anything. This is what the documentation says:

--- "Due to the typical business problems that they solve single pages are wrapped by the theme that you're in. This means you don't need to include header or footer information within your single page - it is already present. Single pages are wrapped by the "view.php" template for the current theme.
...
Want to change this? You can. If you need more flexible control over a single page within a particular theme, just include a file with the same name as your single page within the theme itself. That entirely file will be used as the single pages template, including the header, footer, etc... It can completely override the single page, too. (So, in our example above, once we have "my_profile" added as a single page, add "my_profile.php" to your active theme. This template will then be used instead of the single page." ---


But it does not work. Anybody an idea why?? thanks!
CBknits replied on at Permalink Reply
Did you ever figure this out? I have the same problem.
infiniteuptime replied on at Permalink Reply 1 Attachment
I'm having the exact same problem. Are you running version 5.5.2.1? My environment is attached, for reference.
weyboat replied on at Permalink Reply
weyboat
Try Copying your theme utk_2012_vertical into your webroot/packages folder?