Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default How can I style zen_create_sort_heading output without messing the core?

    Hi
    I was trying to style the product listings.
    I only have price, and name....and image.

    First , is there a way to not have the image in the sort by ?
    THe only way I can do it is clearing the $lc_text related to the image...

    Code:
    case 'PRODUCT_LIST_IMAGE':
        $lc_text = '';
        $lc_align = 'center';
        $zc_col_count_description++;
        break;

    But, I want to add some class or even add a space bettween the name and the "+".
    I already try just to give a blank space, and   + , in the configuration section.

    To the class, looking at product_listings , looks like it has the same class name that is presente in the function... but no changes happen in here:

    Code:
    $list_box_contents[0][$col] = array('align' => $lc_align,
                                          'params' => 'class="productListing-heading"',
                                          'text' => $lc_text
                                           );



    Is there a way to achieve this without messing with this function ?


    // Return table heading with sorting capabilities
    function zen_create_sort_heading($sortby, $colnum, $heading) {
    $sort_prefix = '';
    $sort_suffix = '';

    if ($sortby) {
    $sort_prefix = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . zen_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">' ;
    $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? PRODUCT_LIST_SORT_ORDER_ASCENDING : PRODUCT_LIST_SORT_ORDER_DESCENDING) : '') . '</a>';
    }

    return $sort_prefix . $heading . $sort_suffix;
    }


    Thanks
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: How can I style zen_create_sort_heading output without messing the core?

    Using css would be a way that could be used to control the visibility of the image. Not sure I understand where this image is being displayed that is not desired. There is guidance on generating a CSS file located in the includes/templates/template_default/css directory...

    The applicable css code can be seen typically through inspection of the source code of the displayed page. An appropriate css file could then be generated with the desired css to hide the image(s).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: How can I style zen_create_sort_heading output without messing the core?

    Thanks
    I think the image is there because on configuration -> Product Listing , I have it on....I think everything that is On there, it display on that productListing-heading ... i guess.

    About the style, I think I could style it by css , I think I want to have a kind of button, and I'm using foundation, so yep...
    but the space for "+" and "-"....
    Now i have this : Name+ , I would like to have Name +

    THis is probably easy... but haven't found how to do it
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  4. #4
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: How can I style zen_create_sort_heading output without messing the core?

    Right
    Language file
    Of course !
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

 

 

Similar Threads

  1. v151 Making images the same size without messing them up
    By SilverHD in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 23 Mar 2016, 10:03 PM
  2. Replies: 0
    Last Post: 14 Oct 2014, 08:27 PM
  3. Can you add Ez-pages to the RSS output?
    By JcllcJcllc in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 20 May 2010, 04:52 PM
  4. cannot create new template without messing up display
    By Owen Fowler in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 2 Jun 2009, 02:48 PM
  5. How can I change the product list style?
    By waterlin in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Mar 2009, 10:07 AM

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