How to change the site name in theme destyle

Permalink 1 user found helpful
Hi all, I'm new to Concrete5 and just starting to suss out how to work with it. I'm using theme destyle and would like to know how to change the site name from within the header.php - my code is:
.<h1><a href="<?php echo DIR_REL?>/"><?php 
            $block = Block::getByName('My_Site_Name');  
            if( $block && $block->bID ) $block->display();   
            else echo SITE;
         ?></a></h1>


I'm looking to replace the site name with a logo. I understand it can be done from the scrapbook area, but would like to know how to change it from the header.php if possible?

I'm not a php coder, but have played around with bits and bobs.
When I replace the above code from the destyle theme with:
<h1 id="logo">
<a href="<?php echo DIR_REL?>/">
<img src="<?php echo $this->getThemePath()?>/images/name_of_logo.jpg" alt="logo" /></a></h1>


I can see the logo, but am I missing out on some functionality of the cms with the destyle code?

Many thanks, S

Sannie
 
pvernaglia replied on at Permalink Reply
pvernaglia
[code]
try this:

<img src="<?=$this->getThemePath()?>/images/photo.png">

[code]

I have a cheat sheet you will find helpful athttp://www.weblicating.com/c5/cheat-sheet/...
12345j replied on at Permalink Reply
12345j
no. The first code loads the scrapbook block, so if you don't want that you aren't missing anything.
Sannie replied on at Permalink Reply
Sannie
Hi guys, thanks for your replies. I should have said that when I change the template from destyle to the default one I get to see the logo in place of the my site name text. But it doesn't work in destyle. I'm thinking it must be an installation problem with destyle.
The destyle folder is sitting in the themes folder, but not in the themes folder that is within the 'concrete' folder. Could this be the problem?
12345j replied on at Permalink Reply
12345j
are you editing destyle and not the default theme? it shouldn't be in the concrete folder, it should be in root/pacakges
Sannie replied on at Permalink Reply
Sannie
All sorted guys, it was an installation issue. I started the installation from scratch so the package is installed where it should be now, in the 'packages' folder. Thanks.
Mnkras replied on at Permalink Reply
Mnkras
Sannie I am the author of Destyle, there is a really simple solution, go to your dashboard, click on scrapbooks, make a new one and call it Global, then add a Content block in that scrapbook, add your image, save, then hit rename on the block and make it "My_Site_Name" now clear your cache.
Sannie replied on at Permalink Reply
Sannie
Cheers Mnkras, all sorted now thanks.
talpalunga replied on at Permalink Reply
this post is a little outdated. i want to change that concrete image/text or what it is but scrapbook doesnt exist anymore. how can i do that?
erimarie replied on at Permalink Reply
I am trying to do the same with my logo. This is the only place I found related to this subject. I am so confused on this. Thanks in advance for the help.