page-theme.php has no effect
Permalink
I try to make a Concrete5-site with Bootstrap 3 but i can't get a connection to page_theme.php where you can set Bootstrap up.
The page_theme.php-code is:
This should result in the word 'test' on top of the page but it doesn't show up so I assume there's no connection to page_theme.php. The theme-name is correct, so I don't know where I'm going wrong here.
Do you maybe need additional '777'-permissions for certain folders in that case?
Has anyone had a similar problem and can give me a hint to the solution of mine?
The page_theme.php-code is:
<?php namespace Application\Theme\Altenpflegeheim; use Concrete\Core\Page\Theme\Theme; print 'test'; class PageTheme extends Theme { } ?>
This should result in the word 'test' on top of the page but it doesn't show up so I assume there's no connection to page_theme.php. The theme-name is correct, so I don't know where I'm going wrong here.
Do you maybe need additional '777'-permissions for certain folders in that case?
Has anyone had a similar problem and can give me a hint to the solution of mine?
Thanks for your answer.
The code is from the official Concrete5-video about implementing bootstrap. With the "Print= 'Test'" is tested if "page_theme.php" is connected, that's all. If "Test" shows up in the website everything is OK, which in my case does not, so that's my problem, "page_theme.php" is not connected.
The code is from the official Concrete5-video about implementing bootstrap. With the "Print= 'Test'" is tested if "page_theme.php" is connected, that's all. If "Test" shows up in the website everything is OK, which in my case does not, so that's my problem, "page_theme.php" is not connected.
<?php namespace Concrete\Package\Cloneamental\Theme\Cloneamental; use Concrete\Core\Area\Layout\Preset\Provider\ThemeProviderInterface; class PageTheme extends \Concrete\Core\Page\Theme\Theme implements ThemeProviderInterface { public function registerAssets() { //$this->providesAsset('javascript', 'bootstrap/*'); $this->providesAsset('css', 'bootstrap/*'); $this->providesAsset('css', 'blocks/form'); $this->providesAsset('css', 'blocks/social_links'); $this->providesAsset('css', 'blocks/share_this_page'); $this->providesAsset('css', 'blocks/feature'); $this->providesAsset('css', 'blocks/testimonial'); $this->providesAsset('css', 'blocks/date_navigation');
Viewing 15 lines of 32 lines. View entire code block.
That is a snippet from the cloneamental theme package. Notice where the "protected $pThemeGridFrameworkHandle" variable is set?
Thank you for your reply.
My problem is not the implementation of bootstrap into concrete5 but that I can't get a connection with "page_theme.php" in the first place.
My problem is not the implementation of bootstrap into concrete5 but that I can't get a connection with "page_theme.php" in the first place.
Could this be a version issue (eg, c5.6 vs. c5.7)? Is the video applicable to the version of c5 you're using?
It wasn't a version issue.
The first letter of the theme-folder's name had to be lowercase, that was the main problem.
The first letter of the theme-folder's name had to be lowercase, that was the main problem.
Can you zip and upload your theme files for us to look at?
Thanks for your offer to have a look at it but meanwhile I found out myself what the problem was. In fact there even were two different reasons 'test' wasn't shown:
1. The theme-folder's first letter must be lowercase (which wasn't in my case) or page_theme.php isn't connected. But in 'page_theme.php' the name of the theme's first letter must be uppercase nevertheless.
2. The "print='test'"-test isn't very clever, because the 'test' can obviously get overlapped by Concrete5's header-bar (which it did), so you don't see it at all in editing-mode. So if you test the page-theme-connection with 'print="test"' and 'test' isn't shown try switching off editing-mode.
1. The theme-folder's first letter must be lowercase (which wasn't in my case) or page_theme.php isn't connected. But in 'page_theme.php' the name of the theme's first letter must be uppercase nevertheless.
2. The "print='test'"-test isn't very clever, because the 'test' can obviously get overlapped by Concrete5's header-bar (which it did), so you don't see it at all in editing-mode. So if you test the page-theme-connection with 'print="test"' and 'test' isn't shown try switching off editing-mode.
I do the same thing sometimes, echo a print statement to see whats going on, and yes it gets hidden by the admin bar. I usually open developer tools and look at the html code to see if its there.
My lazier solution: echo a few blank lines first, to ensure that the text comes out below the c5 UI. :)
In code most of the times things get "wrong" because of tiny issues :) like this (upper case for example).
Also, the code is wrong. Here's what should be used: