WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Template doesn't apply when it's a sub page
roachgirl:
I'm picking up an existing site that was created by someone else & have found that the template doesn't apply when a page is identified as a sub page. When it has no parent, the template applies fine. As soon as I identify a parent for it, the template doesn't apply and only the page content is visible.
The site has pages that are already sub pages. (They have parent pages.) The strange thing about all this is the php files that work aren't physically in the directory that they say they're supposed to be in, so I am thinking that the person who established this website probably came across the same issue and has manually done a workaround for this issue.
For example:
www.mysite.com/parent/subpage.php
is really located up one level:
www.mysite.com/subpage.php
When I create a new page, and give it a parent, it places it (naturally) within it's parent directory (www.mysite.com/parent/subpage2.php ), and that's where the template doesn't seem to be applying! Grr!
Has anyone come across this? Any suggestions are gratefully appreciated. I've obsessed over this for a day, and have gotten nowhere on it!
Thanks so much for your help!
doc:
Hello,
check if a template other than blank is choosen for the sub pages (Backend -> Pages -> Settings of your sub page -> Template).
Regards Christian
roachgirl:
Christian, thanks so much for your speedy reply!
Forgive the "stupid question", how do I access the "backend"?
Is this access different than accessing the administration pages? ( www.mysite.com/admin/ )
Regarding the template that is applied: both sub pages have a template that is called "gluten" not "blank", all of the settings are mirrored, the one difference I could find was that the page that worked was not in it's proper sub-directory, it was at the top level of the site.
Thanks again for your help!
BerndJM:
Hi,
please have a look at the index.php of the choosen template.
What looks the link to the css file (most screen.css) like?
If it looks like this:
--- Code: ---<link href="../templates/xxx/screen.css" rel="stylesheet" type="text/css" media="screen" />
--- End code ---
You should it change to this:
--- Code: ---<link href="<?php echo TEMPLATE_DIR; ?>/screen.css" rel="stylesheet" type="text/css" media="screen" />
--- End code ---
Regards Bernd
roachgirl:
Thanks Bernd for the tip, but it didn't seem to help. There was no change in the page in the subdirectory. It did, however seem to affect the other page that was previously working. (the one that was in the main directory, but is a sub page.) It broke it, so I know that it did affect something by making that change.
Hmmm...
Navigation
[0] Message Index
[#] Next page
Go to full version