Replace Site Header with Logo

Permalink
I am brand new to Concrete5 and not a developer, but I am trying to learn enough to get a customized theme that works for me. I purchased the OfficeSpace Theme and I'm attempting to customize it. One issue that I am having is trying to use text suggested in this forum to edit text in the header.php file. The subject I am seeking is logo addition to my header instead of the default header. I have attached the php file and a screen shot. Any help is greatly appreciated.

2 Attachments

 
hexacreative replied on at Permalink Reply
hexacreative
can you more describe what your problem?

if the image problem, maybe you wrong type header image url?
pixelfish replied on at Permalink Reply
pixelfish
Yeah it looks like the image url path.

If the image is in your themes folder the path needs to be

src="<?php echo $this->getThemePath()?>/images/yourimage.jpg"

Alternativly you could put the below inbetween the header divs:

<?php
$logo = new Area('logo');
$logo->setBlockLimit(1);
$logo->display($c);
?>

When you put the page in edit mode you will see an editable area. you could add the image this way from the file manager.

Let me know what you want to do and ill fix it for you.
spugmire replied on at Permalink Reply
Thanks that got it!
ScottC replied on at Permalink Reply
ScottC
this is kind of neat:
<?php if ($c->getCollectionID() != 1){
   $isNotHomePage = 1;
} ?>
<?php if($c->isEditMode() && $isNotHomePage){ ?>
<div class="no-edit-wrapper">
   <p class="error no-edit-allowed" style="width:300px; font-size:0.8em;">Edit disabled, please visit the homepage to change.</p></div>
   <?php } ?>
<span id="logo-header"><!--
         --><a href="<?=DIR_REL?>/">
         <? $aLogo = new Area('Logo');
         if($isNotHomePage) $aLogo->disableControls(); $c = Page::getByID(HOME_CID);
         $aLogo->display($c); ?>
         <?
            if(!$aLogo->getTotalBlocksInArea()){
               if($c->isEditMode()){


add the logo on your homepage, it propogates to everything assuming you are using $this->inc('elements/logo.php') or something similar to place it.
helllooodpr88 replied on at Permalink Reply
helllooodpr88
ScottC when I used this code, the logo went to every page just fine, but it turned off edits to everything else as well. I am working on a fix currently.
ScottC replied on at Permalink Reply
ScottC
that was the intention of the code :)
Do it once, done :)
dalacio replied on at Permalink Reply
Can you give path to this files, I cant find it
cannonf700 replied on at Permalink Reply
cannonf700
dalacio,
it depends on what theme you're using.
If a default concrete5 theme then look here:
root/concrete/themes/yourtheme/elements/header.php where "yourtheme" is the theme your using (dark chocalate, yogurt, etc...)

If you are using a theme installed from the Market Place then look here:
root/packages/yourpackage/themes/yourtheme/elements/header.php
where yourpackage and yourtheme refer to the theme you installed.