I am attempting to **fetch the sub-categories of a parent category in Magento 1.9.2**. I've created a file 'subcategories.phtml' and reference this in a static block. I know the reference in the static block works as it shows the words 'test'.

However, if I update the file with the code below it shows only a blank page. Can anyone please advise an update to get this working?

```
<?php 
//If there are sub categories
$categories = $this->getCurrentChildCategories();
$categoriescount = $this->getCurrentChildCategories()->count();
if ($categoriescount > 0): 
?>
<div class="sub-category-container">    
    <?php 
    //Loop through categories
    foreach ($categories as $category):
    ?>
    <div class="sub-category">
        <a href="<?php echo $this->getCategoryUrl($category)?>" class="cat-image">
        <?php 
        // If there is a thumbnail set for the category - Display it
        if($imgUrl = Mage::getModel('catalog/category')->load($category->getId())->getThumbnail()):?>
        <img src="<?php echo $this->getBaseUrl()."media/catalog/category/".$imgUrl ?>" width="220" height="110" alt="<?php echo $this->htmlEscape($category->getName()) ?>" />
        <?php endif; ?>
        </a>
        <div class="inner-sub-category">
            <a href="<?php echo $this->getCategoryUrl($category)?>" class="sub-link"><?php echo $category->getName()?></a>
            <a href="<?php echo $this->getCategoryUrl($category)?>" class="btn"><span>View All</span></a>
        </div>
    </div>

    <?php endforeach; ?>
</div>
<?php else:?>
<p>No Sub Categories</p>
<?php endif; ?>

```