Jump to content


Photo

Category Description


  • Please log in to reply
2 replies to this topic

#1 DonH

DonH

    Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 1,019 posts

Posted 31 December 2010 - 11:12 AM

Maybe this will help others learning 2.0. B) I had made use of the Category Description in designs with previous versions. After porting over to 2.0, those descriptions were no longer being shown. Using Page Manager, I added a block to the center column for the product-list page with the following block content: <div class="category_description"> <?php CategoryDescription(); ?> </div> Enclosing it in the div allows me to style it differently. After adding the block, I dragged it immediately below the Category Image block. Edit... I discovered that the above adds space for the div when there is no CategoryDescription to display, so I added a check to only display the block if the CategoryDescription is not empty: <?php if (getCategoryDescription() != ''): ?><div class='category_description'><?php CategoryDescription(); ?></div><?php endif; ?>

#2 samo

samo

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 01 April 2012 - 09:45 AM

Maybe this will help others learning 2.0. B)
I had made use of the Category Description in designs with previous versions. After porting over to 2.0, those descriptions were no longer being shown. Using Page Manager, I added a block to the center column for the product-list page with the following block content:
<div class="category_description">
<?php CategoryDescription(); ?>
</div>
Enclosing it in the div allows me to style it differently. After adding the block, I dragged it immediately below the Category Image block.

Edit...
I discovered that the above adds space for the div when there is no CategoryDescription to display, so I added a check to only display the block if the CategoryDescription is not empty:
<?php if (getCategoryDescription() != ''): ?><div class='category_description'><?php CategoryDescription(); ?></div><?php endif; ?>



Thank you for such a great post DonH, it really helped. But please how can I make the description appear to the side of the image rather than the bottom. Thank you

#3 DonH

DonH

    Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 1,019 posts

Posted 01 April 2012 - 10:54 AM

It is in its own div, so you can style and position that div using CSS. I doubt that it is editable using the built in CSS editor. You would need to add a selector and rules to one of the style sheets manually.