Results 1 to 3 of 3
  1. #1

    Default Custom Category description layout

    I just wandered if there was some way to add an if statement to the category description on tpl_index_product_list.php

    The reason for this is that I have a layout for category description text and the filter box set and it looks good but I have some categories that do not have any description on at all and then it looks awful

    How would I add an if statement to the following code

    PHP Code:
    <!-- categories_description bof -->
    <?php
    // categories_description
        
    if ($current_categories_description != '') {
    ?>
    <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description;  ?></div>
    <?php // categories_description ?>
    <!-- categories_description eof -->
    i.e. if category description not empty show my custom layout.

    else do not show category description area but just show the product list

    Please see attached image for more information
    Attached Images Attached Images  

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Custom Category description layout

    The code as you show it is already set to completely skip the #indexProductListCatDescription div if there is no description. If there is a larger area you want to hide, put the same test

    if ($current_categories_description != '') {

    }

    around the code for it. Post that part of the file if you need guidance.

  3. #3

    Default Re: Custom Category description layout

    See what happens when you work to many hours with little coffee, you miss something that is staring you in the face.

    Thanks for pointing my blindness out.

    It worked a treat

 

 

Similar Threads

  1. Custom Product Description Layout
    By WendyT in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Jul 2010, 01:33 PM
  2. Add a product description deletes category description
    By dartmoorcf in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Feb 2010, 08:36 PM
  3. Change Category Page Layout to New Products Layout
    By tonemap in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Jan 2010, 11:30 PM
  4. layout category picture & description
    By Jerry5763837 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Nov 2008, 02:49 PM
  5. Custom Override for One Category Description Page
    By gardenpondcenter in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 12 Nov 2007, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg