<?php if (($_links = Mage::app()->getLayout()->getBlock('cms_footer_links')) && ($_blockId = $this->getBlockId())): ?>
    <?php $_tpl = Mage::helper('designer')->createTemplate($this->getBlockTemplate(), $_blockId) ?>
    <?php $_tpl->setBlockModel($this) ?>
    <?php $_tpl->setContent($_links->toHtml()) ?>
    <?php echo $_tpl->toHtml() ?>
<?php endif ?>