I think I messed up my header and footer php
Permalink
I think I messed up my header and footer php while trying to remove my site name from the header and changing the footer to remove 'install concreter hosting' in the footer.
However, on the surface my website is working finehttp://www.aseanexhibition.com
Here is the result of web developer tool html validation
Validation Output: 2 Errors
Error Line 193, Column 6: document type does not allow element "hr" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<hr />
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Error Line 220, Column 163: end tag for "br" omitted, but OMITTAG NO was specified
…"></a> <a href="http://www.bluehost.com" title=""></a> <br> <center> </center>
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
Info Line 220, Column 159: start tag was here
…"></a> <a href="http://www.bluehost.com" title=""></a> <br> <center> </center>
This is my current footer php
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<div id="footer">
<span class="powered-by"><a href="http://www.concrete5.org" title="<?php echo t('concrete5 - open source content management system for PHP and MySQL')?>"><?php echo t('Powered by Concrete5')?></a></span>
© <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/"><?php echo SITE?></a>.
<?php echo t('All rights reserved.')?> <a href="http://www.simplescripts.com/script_details/install:concrete5" title=""></a> <a href="http://www.bluehost.com" title=""></a> <br> <center> </center>
<?php
$u = new User();
if ($u->isRegistered()) { ?>
<?php
if (Config::get("ENABLE_USER_PROFILES")) {
$userName = '<a href="' . $this->url('/profile') . '">' . $u->getUserName() . '</a>';
} else {
$userName = $u->getUserName();
}
?>
<span class="sign-in"><?php echo t('Currently logged in as <b>%s</b>.', $userName)?> <a href="<?php echo $this->url('/login', 'logout')?>"><?php echo t('Sign Out')?></a></span>
<?php } else { ?>
<span class="sign-in"><a href="<?php echo $this->url('/login')?>"><?php echo t('Sign In to Edit this Site')?></a></span>
<?php } ?>
</div>
</div>
<?php Loader::element('footer_required'); ?>
</body>
</html>
This is my current header php
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />
<?php Loader::element('header_required'); ?>
</head>
<body>
<div id="page">
<div id="headerSpacer"></div>
<div id="header">
<?php if ($c->isEditMode()) { ?>
<div style="min-height: 80px">
<?php } ?>
<div id="headerNav">
<?php
$a = new Area('Header Nav');
$a->display($c);
?>
</div>
<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>
<?php
// we use the "is edit mode" check because, in edit mode, the bottom of the area overlaps the item below it, because
// we're using absolute positioning. So in edit mode we add a bit of space so everything looks nice.
?>
<div class="spacer"></div>
<?php if ($c->isEditMode()) { ?>
</div>
<?php } ?>
<div id="header-area">
<div class="divider"></div>
<div id="header-area-inside">
<?php
$ah = new Area('Header');
$ah->display($c);
?>
</div>
<?php if ($ah->getTotalBlocksInArea() > 0) { ?>
<div class="divider"></div>
<?php } ?>
</div>
</div>
However, on the surface my website is working finehttp://www.aseanexhibition.com
Here is the result of web developer tool html validation
Validation Output: 2 Errors
Error Line 193, Column 6: document type does not allow element "hr" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<hr />
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Error Line 220, Column 163: end tag for "br" omitted, but OMITTAG NO was specified
…"></a> <a href="http://www.bluehost.com" title=""></a> <br> <center> </center>
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
Info Line 220, Column 159: start tag was here
…"></a> <a href="http://www.bluehost.com" title=""></a> <br> <center> </center>
This is my current footer php
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<div id="footer">
<span class="powered-by"><a href="http://www.concrete5.org" title="<?php echo t('concrete5 - open source content management system for PHP and MySQL')?>"><?php echo t('Powered by Concrete5')?></a></span>
© <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/"><?php echo SITE?></a>.
<?php echo t('All rights reserved.')?> <a href="http://www.simplescripts.com/script_details/install:concrete5" title=""></a> <a href="http://www.bluehost.com" title=""></a> <br> <center> </center>
<?php
$u = new User();
if ($u->isRegistered()) { ?>
<?php
if (Config::get("ENABLE_USER_PROFILES")) {
$userName = '<a href="' . $this->url('/profile') . '">' . $u->getUserName() . '</a>';
} else {
$userName = $u->getUserName();
}
?>
<span class="sign-in"><?php echo t('Currently logged in as <b>%s</b>.', $userName)?> <a href="<?php echo $this->url('/login', 'logout')?>"><?php echo t('Sign Out')?></a></span>
<?php } else { ?>
<span class="sign-in"><a href="<?php echo $this->url('/login')?>"><?php echo t('Sign In to Edit this Site')?></a></span>
<?php } ?>
</div>
</div>
<?php Loader::element('footer_required'); ?>
</body>
</html>
This is my current header php
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />
<?php Loader::element('header_required'); ?>
</head>
<body>
<div id="page">
<div id="headerSpacer"></div>
<div id="header">
<?php if ($c->isEditMode()) { ?>
<div style="min-height: 80px">
<?php } ?>
<div id="headerNav">
<?php
$a = new Area('Header Nav');
$a->display($c);
?>
</div>
<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>
<?php
// we use the "is edit mode" check because, in edit mode, the bottom of the area overlaps the item below it, because
// we're using absolute positioning. So in edit mode we add a bit of space so everything looks nice.
?>
<div class="spacer"></div>
<?php if ($c->isEditMode()) { ?>
</div>
<?php } ?>
<div id="header-area">
<div class="divider"></div>
<div id="header-area-inside">
<?php
$ah = new Area('Header');
$ah->display($c);
?>
</div>
<?php if ($ah->getTotalBlocksInArea() > 0) { ?>
<div class="divider"></div>
<?php } ?>
</div>
</div>
Also, if you're trying to create custom blocks, depending on how complex they are this might be a helpful tool for you:
http://www.concrete5.org/marketplace/addons/designer-content...