I have a store that I am developing using Magento CE 1.8.1. On my category pages, I have modified the 2 Column Left Sidebar but I am having an issue.
On the left side bar, I have made a border via css where it shows subcategories, prices, etc. This same border will appear with nothing in it when a category does not have any sub categories.
How would I make no border appear when the category does not have any sub-categories?
<div class="wrapper">
<?php echo $this->getChildHtml('global_notices') ?>
<?php echo $this->getChildHtml('header') ?>
<div class="container thirteen columns">
<div class="main">
<?php echo $this->getChildHtml('breadcrumbs') ?>
<aside class="col-left sidebar three columns"><?php echo $this->getChildHtml('left') ?></aside>
<section class="col-main twelve columns">
<?php echo $this->getChildHtml('global_messages') ?>
<?php echo $this->getChildHtml('content') ?>
</section>
</div>
</div>
<?php echo $this->getChildHtml('footer') ?>
<?php echo $this->getChildHtml('global_cookie_notice') ?>
<?php echo $this->getChildHtml('before_body_end') ?>
</div>
<?php echo $this->getAbsoluteFooter() ?>
Basically, I am using the 2column-left template and copied into my theme directory. Above, I have where it says aside class="col-left sidebar three columns", my css looks like the following:
aside.col-left
{
border: 1px dotted #000;
border-right-width: thin;
padding: 7px 5px 10px 5px;
}
I am still new to developing for magento so maybe I am doing it wrong. Any pointers would help?
foreach
loop and thediv
which contains the subcategories you will have to check if there are subcategories at all. But better show us the template code.