Results 1 to 10 of 14

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    13
    Plugin Contributions
    0

    Default Trying to add line breaks into description

    I'm attempting to add line breaks into the product listing.

    As you can see below, the word 'Test" is on the same line for the first product.

    http://store.freehandnetworks.com/in...ndex&cPath=5_9

    I commented out the lines in functions_general.php that changes the "<BR>" type tags to spaces. It appears the tags are still being changed to spaces.

    Does anyone have any pointers to keep the tags from being replaced?

    Thanks,
    Doug

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Trying to add line breaks into description

    Quote Originally Posted by DougWare View Post
    I'm attempting to add line breaks into the product listing.

    As you can see below, the word 'Test" is on the same line for the first product.

    http://store.freehandnetworks.com/in...ndex&cPath=5_9

    I commented out the lines in functions_general.php that changes the "<BR>" type tags to spaces. It appears the tags are still being changed to spaces.

    Does anyone have any pointers to keep the tags from being replaced?

    Thanks,
    Doug
    for up to 10 users and 1 month management service. <br />Test

  3. #3
    Join Date
    Mar 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: Trying to add line breaks into description

    Quote Originally Posted by haredo View Post
    for up to 10 users and 1 month management service. <br />Test
    That produced the same result...

  4. #4
    Join Date
    Mar 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: Trying to add line breaks into description

    What's even stranger is that the <P> tag works, just not the <BR> tag. I've searched and searched, and I don't seem to be able to find where the tag is being replaced.

    Can someone please point me in the right direction?

    Thanks,
    Doug

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

    Default Re: Trying to add line breaks into description

    The place to change this is not in functions_general.php, but in /includes/modules/your_template/product_listing.php.

    All you need to do is comment out zen_clean_html in two places, like this:

    /*zen_clean_html*/
    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break; 

  6. #6
    Join Date
    Mar 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: Trying to add line breaks into description

    That worked perfectly!

    Thanks!

    Quote Originally Posted by gjh42 View Post
    The place to change this is not in functions_general.php, but in /includes/modules/your_template/product_listing.php.

    All you need to do is comment out zen_clean_html in two places, like this:

    /*zen_clean_html*/
    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break; 

 

 

Similar Threads

  1. v138a Trying to keep line breaks in product description
    By 007mcfod in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 13 May 2014, 11:48 PM
  2. Adding html tables to product description adds extra line breaks
    By ndknsrln in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 4 Mar 2013, 12:35 AM
  3. How Do I Format A Product Description to include line breaks and bullet points?
    By mike373 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Apr 2011, 07:44 PM
  4. on products page need line breaks after parts of description
    By jamesdavid in forum General Questions
    Replies: 7
    Last Post: 17 Jun 2008, 05:43 PM
  5. Replies: 3
    Last Post: 30 Dec 2007, 02:43 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