Single Page not using view.php
Permalink
Hi,
My single page is displaying the "innercontent" without the outer wrapper.
In other words, the single page content is displayed, but the view.php shell is not wrapped around it.
Any ideas?
My single page is displaying the "innercontent" without the outer wrapper.
In other words, the single page content is displayed, but the view.php shell is not wrapped around it.
Any ideas?
Thanks Mnkras,
The problem was that I had placed my singles pages in the theme folder and the single pages folder. The single pages in the theme folder overrode the single pages folder.
So I was just viewing my single pages as if they were theme pages, which meant they had no wrapper and no place for dynamic content.
The problem was that I had placed my singles pages in the theme folder and the single pages folder. The single pages in the theme folder overrode the single pages folder.
So I was just viewing my single pages as if they were theme pages, which meant they had no wrapper and no place for dynamic content.
Am I missing something? I'm having the same problem. None of my single pages are being overridden from either the single_pages folder or my themes folder. They are all rendering inside the concrete5 wrapper.
Shouldn't my theme's view.php file override the default theme? All my single pages are still showing up with the default concrete5 wrapper, not my view.php or my new single page (such as page_not_found.php)
Shouldn't my theme's view.php file override the default theme? All my single pages are still showing up with the default concrete5 wrapper, not my view.php or my new single page (such as page_not_found.php)
make sure your active theme has a view.php file and it has the following:
<?php print $innerContent; ?>
where you want your singlepage stuff to show up.
Otherwise I haven't had this problem, make sure your theme is set correctly for the page type you are trying to wrap your singlepage in?
<?php print $innerContent; ?>
where you want your singlepage stuff to show up.
Otherwise I haven't had this problem, make sure your theme is set correctly for the page type you are trying to wrap your singlepage in?
Hey dpidan,
Actually, what you are experiencing is how single pages are supposed to work. The files you put in the single pages folder are used as the content, with the view.php page being the wrapper. So you dont want to put any interface elements in your single pages; only content :)
Your content will then show up wrapped by whatever is in the view.php page. It's the line
<?php print $innerContent; ?>
in your view.php page that prints the content from your single pages. Hope that makes sense.
Actually, what you are experiencing is how single pages are supposed to work. The files you put in the single pages folder are used as the content, with the view.php page being the wrapper. So you dont want to put any interface elements in your single pages; only content :)
Your content will then show up wrapped by whatever is in the view.php page. It's the line
<?php print $innerContent; ?>
in your view.php page that prints the content from your single pages. Hope that makes sense.
Thank you both for replying. I'd already done what you suggested with no luck a while back. Am I still missing something? I found the following posts:
http://www.concrete5.org/index.php?cID=4499...
http://www.concrete5.org/help/building_with_concrete5/developers/th...
These seem to indicate that single pages are NOT being displayed with my theme's view.php unless I call out each individual page in config/site_theme_paths.php.
This is quit a hassle. Do I really have to call out each single page in my site_theme_paths.php file for it to display via my theme's view.php file? Because that's what I have to do right now.
Is there a way to have all my single pages display via my theme's view.php file without needing to call them out individually (separate from the dashboard pages, though)?
Thanks for the help.
http://www.concrete5.org/index.php?cID=4499...
http://www.concrete5.org/help/building_with_concrete5/developers/th...
These seem to indicate that single pages are NOT being displayed with my theme's view.php unless I call out each individual page in config/site_theme_paths.php.
This is quit a hassle. Do I really have to call out each single page in my site_theme_paths.php file for it to display via my theme's view.php file? Because that's what I have to do right now.
Is there a way to have all my single pages display via my theme's view.php file without needing to call them out individually (separate from the dashboard pages, though)?
Thanks for the help.
Yeah, you're right. I guess you have to add each individually in the dashboard as well. I guess I never considered this an issue because I've only had a few single pages per site, but it sounds like you might have a lot. Though in that case, you might want to reconsider using single pages for that kind of content, because you'll be working against the way C5 is setup, not with it. C5 is streamlined for adding content via the CMS, not outside it, which is really what single pages are.
Same problem here, but it must be for another reason. I have a single page called Signup (different from 'register') that refuses to be wrapped in view.php. My other single pages work fine, but this one won't cooperate. It doesn't matter which theme I give it, when I go to the page in my browser and 'View Source', the only code that's there is the single page (i.e. the inner content), not a trace of any wrapper.
I don't have any theme wrappers called signup.php -- that is to say it should get wrapped in view.php. I haven't called the header twice, not that that problem would lead to these symptoms anyway. I haven't set a rule for '/signup' in site_theme_paths, but that wouldn't really apply here either. I've tried refreshing the single page, deleting it and adding it again, clearing the site cache……nothing works.
In fact, I have practically the same single page file (the only difference is some lines of jQuery) on my localhost, and it works fine. It gets wrapped in the view.php of whatever theme I assign to it. And my other single pages work fine, both locally and on the remote server. So I can only conclude that it's something bizarre going on with c5 that I have no idea how to fix. I'm still on 5.3.3.1 at this point. I guess my next step is to upgrade and see if that solves anything.
Help?
I don't have any theme wrappers called signup.php -- that is to say it should get wrapped in view.php. I haven't called the header twice, not that that problem would lead to these symptoms anyway. I haven't set a rule for '/signup' in site_theme_paths, but that wouldn't really apply here either. I've tried refreshing the single page, deleting it and adding it again, clearing the site cache……nothing works.
In fact, I have practically the same single page file (the only difference is some lines of jQuery) on my localhost, and it works fine. It gets wrapped in the view.php of whatever theme I assign to it. And my other single pages work fine, both locally and on the remote server. So I can only conclude that it's something bizarre going on with c5 that I have no idea how to fix. I'm still on 5.3.3.1 at this point. I guess my next step is to upgrade and see if that solves anything.
Help?
Alright, it seems like I had named a php variable $theme that must have been conflicting with some variable that c5 uses. Though why it wasn't causing problems at my localhost with the same version of c5 I have no idea. Anyway, I renamed it to $curr_theme and all seems to be well.
I guess what I've learned is that such php conflicts do produce these results -- an unwrapped single page. So, for posterity, one should note that if you get a single page without any of the markup you'd expect from view.php, check for any php in your page that could be causing the server to choke.
I guess what I've learned is that such php conflicts do produce these results -- an unwrapped single page. So, for posterity, one should note that if you get a single page without any of the markup you'd expect from view.php, check for any php in your page that could be causing the server to choke.
or conflicting css