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:

<?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?

 
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
The page_theme.php file is basically the controller for the theme, so nothing should be printed, and you don't need the use function.

Also, the code is wrong. Here's what should be used:

namespace Concrete\Package\PackageName\Theme\ThemeName;
class PageTheme extends \Concrete\Core\Page\Theme\Theme {
}
conker39 replied on at Permalink Reply
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.
ob7dev replied on at Permalink Reply
ob7dev
<?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');

That is a snippet from the cloneamental theme package. Notice where the "protected $pThemeGridFrameworkHandle" variable is set?
conker39 replied on at Permalink Reply
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.
Gondwana replied on at Permalink Reply
Gondwana
Could this be a version issue (eg, c5.6 vs. c5.7)? Is the video applicable to the version of c5 you're using?
conker39 replied on at Permalink Reply
It wasn't a version issue.
The first letter of the theme-folder's name had to be lowercase, that was the main problem.
ob7dev replied on at Permalink Reply
ob7dev
Can you zip and upload your theme files for us to look at?
conker39 replied on at Permalink Reply
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.
ob7dev replied on at Permalink Reply
ob7dev
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.
Gondwana replied on at Permalink Reply
Gondwana
My lazier solution: echo a few blank lines first, to ensure that the text comes out below the c5 UI. :)
siton replied on at Permalink Reply
siton
In code most of the times things get "wrong" because of tiny issues :) like this (upper case for example).