Missing Content Area
August 21, 2010 at 1:17 PM
Hi all,
I made a template here is the view.php:
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
$this->inc('elements/header.php'); ?>
<div id="wrapper">
<div id="header">
<div id="header_imgs">
<div id="menu">
<?php
$a = new Area('Navigation');
$a->display($c);
?>
</div>
<div id="header_content">
<?php
$a = new Area('Header Content');
$a->display($c);
?>
</div>
</div>
</div>
<div id="content">
<div id="main_content1">
<?php
$a = new Area('Main Content');
$a->display($c);
?>
</div>
</div>
<div id="footer">
<div id="footer_nav">
<span class="powered-by"><?php echo t('Built with concrete5')?> <a href="http://www.concrete5.org">CMS</a>.</span>
© <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/"><?php echo SITE?></a>.
<?php echo t('All rights reserved.')?>
<?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="powered-by"><?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>
</div>
<?php $this->inc('elements/footer.php'); ?>
Here is the source code of the actual page:
<div id="content">
<div id="blockStyle22" class=" ccm-block-styles" >
<div style="width:100%">
<div class="" style="min-height:1px;width:255px;float:left;vertical-align:top;;margin-left: 0px;margin-right: 24.5px">
<div id="areaStyle13" class=" ccm-area-styles ccm-area-styles-a54" >
<div id="blockStyle13" class=" ccm-block-styles" >
<h1><span style="font-family: trebuchet ms,geneva;">This is a test</span></h1>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;"><br /></span></p></div></div> </div>
<div class="" style="min-height:1px;width:255px;float:left;vertical-align:top;;margin-left: 24.5px;margin-right: 24.5px">
<div id="areaStyle13" class=" ccm-area-styles ccm-area-styles-a55" >
<div id="blockStyle13" class=" ccm-block-styles" >
<h1><span style="font-family: trebuchet ms,geneva;">This is a test</span></h1>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p></div></div> </div>
<div class="" style="min-height:1px;width:255px;float:left;vertical-align:top;;margin-left: 24.5px;margin-right: 0px">
<div id="areaStyle13" class=" ccm-area-styles ccm-area-styles-a56" >
<div id="blockStyle13" class=" ccm-block-styles" >
<h1><span style="font-family: trebuchet ms,geneva;">This is a test</span></h1>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p>
<p><span style="font-size: small;">test</span></p></div></div> </div>
</div>
The main content area is occupied and displays but when the php outputs the html it does not output the id="main_content" div. Therefore the styling I have for it does not take effect. Can someone tell me why the id="main_content" div won't output and how to fix it? Thanks.
<?php
$a = new Area('Main Content');
$a->display($c);
?>"
the 1 at the end could cause issues. Also it's best to have your main content be named "Main" not "Main Content".