PHP or Magento Experts ... Please Help?
Basically I've got a vertical nav menu in a magento ecommerce site.
The code below is displaying the vertical nav menu the sub-categories
on the home page, but they're not hyperlinked (yet).
<?php
= Mage::getModel('catalog/category')->load(2)->getChildren();
= explode(',',);
?>
<ul>
<?php foreach( as ): ?>
<li>
<?php
= Mage::getModel('catalog/category')->load();
echo ();
= Mage::getModel('catalog/category')->load(())->getChildren();
= explode(',',);
?>
<?php if(count() > 1):?>
<ul>
<?php foreach( as ) :?>
<li>
<?php
= Mage::getModel('catalog/category')->load();
echo ();
?>
</li>
<?php endforeach;?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
it'll hyperlink the categories.
Here's the "instructions" that were given...
NOTE: After loading each category you have a whole array of different attributes you can use. If you wanted to make each category listing be a link, simply use the getUrl() function in a similar fashion: |
#a href="<?php echo ()?>"> <?php echo ()?></a#
OK, seems as though the Warrior Forum wont allow me
to show you the code...
So if you could kindly check this site out,
all the code is there.
Magento Custom Category Listing Block | Devin R. Olsen Web Developer
There's a youtuibe video there as well, but
mentions nothing of the hyperlinking code.
Now, Im not sure if this is enough info, but Im pretty sure
a php expert could easily pick this up and whip their magic to give some much needed advice?
Any assistance would be greatly appreciated,
Thanks a bunch in advance,
- aj
--= -Spazzle- =--