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.
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.
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.
Thanks that got it!
this is kind of neat:
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.
<?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()){
Viewing 15 lines of 21 lines. View entire code block.
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.
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.
that was the intention of the code :)
Do it once, done :)
Do it once, done :)
Can you give path to this files, I cant find it
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.
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.
if the image problem, maybe you wrong type header image url?