Magento static page
How to display category images in Magento static cms page
Follow the code which show images of sub category in static cms page. <?php$_categories=$this->getCurrentChildCategories() ?><?php if($_categories->count()): ?><ul class=”category-links”> <?php foreach ($_categories as $_category): ?> <?php if($_category->getIsActive()): $cur_category=Mage::getModel(‘catalog/category’)->load($_category->getId()); $layer = Mage::getSingleton(‘catalog/layer’); $layer->setCurrentCategory($cur_category); //$_imageUrl = $this->getCurrentCategory()->getImageUrl(); ?> <li class=”<?php echo $this->htmlEscape($_category->getUrlKey()) ?>”> <?php if($_imageUrl = $this->getCurrentCategory()->getImageUrl()){?> <img src=”<?php echo $_imageUrl; ?>” alt=”<?php echo $this->htmlEscape($_category->getName()) ?>” /> <? […]
magento show subcategories from categories in static block
For showing Subcategory please put this follow those steps <?php /** * ** Instructions for Use ** * * 1. Upload this page to your installation at: * /app/design/frontend/[INTERFACE]/[THEME]/template/catalog/navigation/custom-category.phtml * * 2. Enter the following code in a static block: * {{block type=”catalog/navigation” name=”catalog.navigation” template=”catalog/navigation/custom-category.phtml”}} * * 3. Select the static block as the […]
magento difference between page and static block
–> if we create a CMS page, there are available link in frontend. User can access the CMS page by the identifer. And Static blocks are using inside category and other pages. We can call static blocks form .phtml page or cms pages.