5.7.2.1 Grid Support

Permalink
Hi all!

I am trying to set up a template using 5.7.2.1 and following the videocast on 'Enabling Grid Support for Areas and Layouts'. In the video it says to create your page_theme.php file and include
<?php
namespace Application\Theme\Urbanic;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme
{
}


I have done this and (obviously) changed my template and have
<?php
namespace Application\Themes\BayEngraving;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme
{
 protected $pThemeGridFrameworkHandle = 'bootstrap3';
}


When I try to re-install the template I get the following error message where the Install button should be 'The theme file page_theme.php does not defines the class Application\Theme\Bay Engraving\PageTheme'.

It appears from looking through the Forum that the core code area has changed or been moved. I believe the necessary files are now located in
'\concrete\src\Page\Theme'
but I cannot get this to work either.

Does anyone have any advice?

Many thanks

Simon.

dclmedia
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi Simon,

Try this
<?php
namespace Application\Theme\BayEngraving;
class PageTheme extends \Concrete\Core\Page\Theme\Theme 
{
    protected $pThemeGridFrameworkHandle = 'bootstrap3';
}
dclmedia replied on at Permalink Reply
dclmedia
Hey there!

Thanks for the prompt reply. I have tried this but unfortunately it hasnt changed anything. One thing that is confusing me if the Themes folder under applications is '/application/themes' and all documentation says to use /Application/Theme', which doesnt exist.
MichaelG replied on at Permalink Best Answer Reply
MichaelG
you need to use
"Theme" without the "s", even though your folder sits in the themes (with the s) folder.

Also, page_theme.php gets registered when you install. So once you've corrected it, you need to reinstall

Also as your theme name is "BayEngraving" your folder should be named "bay_engraving"

<?php
namespace Application\Theme\BayEngraving;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme {
    //all the functions here
}
dclmedia replied on at Permalink Reply
dclmedia
Perfect, this is now all working great! The problem was with my folder name, I broke the cardinal rule and had uppercase characters!

Thank you :-)
interneteditor replied on at Permalink Reply
I am trying to learn how to convert a theme using the video and text tutorials and Urbanic theme.

Everything was going well until I created the page_theme.php and I can't seem to get it to work having tried lots of tips here and other places.

The file currently contains:

<?php
namespace Application\Theme\urbanic;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme {
}


I have tried adding assets code and all sorts of advice but nothing helps.

On the template installation page I get the error:

The theme file page_theme.php does not defines the class Application\Theme\Urbanic\PageTheme

My Urbanic folder is in the right place, it has a lower case U, I tried uppercase and lowercase in the page_theme.php but nothing helps

The content of the page_theme.php is being output in the top left corner too.

Can anyone help please?
MrKDilkington replied on at Permalink Reply
MrKDilkington
@interneteditor

If you zip your theme and attach it to a reply, I will look at it.