I'm using Magento at the moment, and I've tried to display all categories in a page.
I've done that, but now I want to have each category display in a separate div element.
At the moment, they're all displayed in an unordered list.
I believe I have to change something in the PHP line of code that says "getStoreCategories", but I don't know what to replace it with.
<?php $_helper = Mage::helper('catalog/category') ?>
<?php $_categories = $_helper->getStoreCategories() ?>
<?php if (count($_categories) > 0): ?>
<?php foreach($_categories as $_category): ?>
<?php echo $_category->getImage() ?>
<a href="<?php echo $_helper->getCategoryUrl($_category) ?>">
<?php echo $_category->getName() ?>
<?php echo $_category->getDesc() ?>
<?php echo $_category->getUrlPath() ?>
<?php endforeach; ?>
<a class="button" href="<?php echo $url_path; ?>">View Products</a>
<?php endif; ?>
By the way, I got the idea for the PHP code from this address: