Site Name in version 5.5

Permalink
Hi All,

Since upgrading, I've become confused on how to change what used to be the scrapbook area. I see the global stack of Site Name, which I've changed, but how do I change that area if is an uneditable region?

 
VidalThemes replied on at Permalink Best Answer Reply
VidalThemes
Hi, in the older C5 themes, the site name was called something like this:

<h1 id="logo">
<a href="<?php echo DIR_REL?>/"><?php 
$block = Block::getByName('My_Site_Name');  
if( $block && $block->bID ) $block->display();   
else echo SITE;
?></a>
</h1>


That no longer works in 5.5, it now needs calling like this, to utilise the new global area for the header, you will then be able to edit your sites name like any other editable content on your site:


<?
$a = new GlobalArea('Site Heading');
$a->display();
?>
bakerjr replied on at Permalink Reply
So there isnt a non code way in 5.5 like scrapbook in earlier versions?
VidalThemes replied on at Permalink Reply
VidalThemes
What it boils down to is that themes designed for version 5.4.2.2 and below wont be totally compatible with 5.5, dont get me wrong they wont be fundamentally broken, but certain areas like the global site name wont be there as they are a new feature in 5.5.

Once these areas are present in your theme you will be able to just go to the stack for the site name, if you wish, and change your site name, stacks are the 5.5 equivalent of the scarp book, having said that changing a 5.5 global area on your site will change it in the stack and all the way through your site anyway.

If you are using a bought theme, it may be an idea to contact the seller and ask them if/when a 5.5 version will be available, and if you are building your own theme, download 5.5 and go to concrete/themes and open up the default theme in your code editor and you will soon see all the new pieces of code you will need to build a 5.5 compatible theme.
pvernaglia replied on at Permalink Reply
pvernaglia
If you upgrade a site from 5.4 to 5.5 and had scrapbooks defined they will still function OK, but a clean install of 5.5 will need the changes like you mentioned in the theme.