title: Magento PHP if statement "load both blocks" , else load only one?
body: <p>maybe it is something simple but i am not really good with php<br>
  With this code i am able to load the static blocks styled in top of category in Magento and the subcategories in the bottom when the top category has child<br>
  What i am trying to do is that when there is no child category it should only load the block<br>
  otherwise because of styling it will hold the place that the subcat had position.
  Please have a look on my code and maybe you understand: <br></p>
  
  <pre><code>&lt;?php
      $_helper    = $this-&gt;helper('catalog/output');
      $_category  = $this-&gt;getCurrentCategory();
      $_imgHtml   = '';
      if ($_imgUrl = $_category-&gt;getImageUrl()) {
          $_imgHtml = '&lt;div class="category-image"&gt;&lt;img src="'.$_imgUrl.'" alt="'.$this-&gt;htmlEscape($_category-&gt;getName()).'" title="'.$this-&gt;htmlEscape($_category-&gt;getName()).'" /&gt;&lt;/div&gt;';
          $_imgHtml = $_helper-&gt;categoryAttribute($_category, $_imgHtml, 'image');
      }
      $_catHtml = $this-&gt;getChildHtml('catalog.inline.subcat');
  ?&gt;
  &lt;?php if (!Mage::registry('current_category')) return ?&gt;
  &lt;?php $_categories = $this-&gt;getCurrentChildCategories() ?&gt;
  &lt;?php $_count = is_array($_categories)?count($_categories):$_categories-&gt;count(); ?&gt;
  &lt;?php if($_count): ?&gt;
  
  // load the blocks styled with ul and il backgrounds 
  
                  &lt;ul class="inline-categories"&gt; 
                  &lt;?php echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId(   $this-&gt;getCurrentCategory()-&gt;getLandingPage()    )-&gt;toHtml() ?&gt; 
                  &lt;?php foreach ($_categories as $_category): ?&gt;
                  &lt;li&lt;?php if($_i == 1):?&gt; class="first"&lt;?php endif ?&gt;&gt;&lt;a href="&lt;?php echo $this-&gt;getCategoryUrl($_category) ?&gt;"&lt;?php if ($this-&gt;isCategoryActive($_category)): ?&gt; class="current"&lt;?php endif; ?&gt;&gt;    
                  &lt;?php echo $this-&gt;htmlEscape($_category-&gt;getName()) ?&gt;&lt;/a&gt; (&lt;?php echo $_category-&gt;getProductCount() ?&gt;)&lt;/li&gt;
                  &lt;?php endforeach ?&gt; 
                  &lt;?php endif; ?&gt;     
                  &lt;/ul&gt;
  
                  // here i need something like an "else" because the if($count) allready understand that this is not on count so should only load this that is without style //
  
                 &lt;?php echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId(   $this-&gt;getCurrentCategory()-&gt;getLandingPage()    )-&gt;toHtml() ?&gt; 
  
                  //end of this else thing, now should only load the cms/block alone without anything / end of page we are done...
  </code></pre>