2

I was going through the level up video tutorials about magento, in that they are using the sample data and are making a theme in which one thing they do is shift the block from one side to the other but i do not have this block, so how to put this block into my magento site?

2

Add below code in your layout files,

<block type="tag/popular" name="tags_popular" template="tag/popular.phtm">
 <action method="setTemplate"><template>tag/popular.phtml</template></action>
</block>
1

In the default theme you can look into app/design/frontend/base/default/layout/tag.xml and see the following code:

<default>
    <!-- Mage_Tag -->
    <reference name="left">
        <block type="tag/popular" name="tags_popular" template="tag/popular.phtml"/>
    </reference>

</default>

This will add the block tag/popular but do note that this will only display if there are tags in the system.

protected function _toHtml()
{
    if (count($this->getTags()) > 0) {
        return parent::_toHtml();
    }
    return '';
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.