Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Adding images to next and previous arrows?

    I would like to replace text with images, for the next and previous pages (when viewing category pages). This is located on top and bottom of my products for my category pages. One can be seen here: http://www.lasilhouettelingerie.com/...age=2&sort=20a

    I am not sure which template page to find look for these arrows. I do have this file in my template folder: includes/template/MYTEMPLATE/templates/tpl_products_next_previous.php which I suspect could be the page to find the div definitions.

    Here is the code in this file:
    Code:
    <div class="navNextPrevWrapper">
    <?php
    // only display when more than 1
      if ($products_found_count > 1) {
    ?>
    <p class="navNextPrevCounter"><?php echo (PREV_NEXT_PRODUCT); ?><?php echo ($position+1 . "/" . $counter); ?></p>
    <div class="navNextPrevList"><a href="<?php echo zen_href_link(zen_get_info_page($previous), "cPath=$cPath&products_id=$previous"); ?>"><?php echo $previous_image . $previous_button; ?></a></div>
    
    <div class="navNextPrevList"><a href="<?php echo zen_href_link(FILENAME_DEFAULT, "cPath=$cPath"); ?>"><?php echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LIST, BUTTON_RETURN_TO_PROD_LIST_ALT); ?></a></div>
    
    <div class="navNextPrevList"><a href="<?php echo zen_href_link(zen_get_info_page($next_item), "cPath=$cPath&products_id=$next_item"); ?>"><?php echo  $next_item_button . $next_item_image; ?></a></div>
    <?php
      }
    ?>
    </div>
    If I just want to put one arrow at the beginning for previous (when there are more pages before), and arrow after for next (when there are more pages after). I can figure out how to add the CSS to my stylesheet, I just don't know where to find the page that holds these definitions. Second I want to make sure these arrows that show now are not coming from within my control panel setting (like in configuration>product listings. But I do not see it anywhere so I suspect css controls these arrows.

    Please point me to the correct file, so I can modify these css definitions to add my images.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Adding images to next and previous arrows?

    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Re: Adding images to next and previous arrows?

    I appears my template has some sort plugin built in for previous/next. For one I found this file under: ../MYTEMPLATES/templates/tpl_products_next_previous.php. In the header of this file I have this:

    PHP Code:
    /*
     WebMakers.com Added: Previous/Next through categories products
     Thanks to Nirvana, Yoja and Joachim de Boer
     Modifications: Linda McGrath [email protected]
    */ 
    I could not find that module in the plugins. I can see on my product category detail page a: previous, listing, and next button. I also see some settings in my control panel under: configuration> product info
    Code:
    Previous Next - Button and Image Status 
    Previous Next - Navigation Includes Category Position
    Previous Next - Navigation Includes Category Name and Image Status
    Previous Next - Navigation Bar Position
    Previous Next - Button and Image Settings
    Previous Next - Sort Order
    Previous Next - Image Width?
    Previous Next - Image Height?
    This all controls the previous and next on the product listing page. I would like to add images to the previous/next on the product category page (showing multiple products). Will this recommended script interfere with my already established previous/next plugin? If I could find this plugin, there might be built in functionality for what I need already built in.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Adding images to next and previous arrows?

    Will this recommended script interfere with my already established previous/next plugin?
    You will need to merge the alterations into one file
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    682
    Plugin Contributions
    0

    Default Re: Adding images to next and previous arrows?

    OK Kobra, I hate to install a full module that has many coding changes. Even with merging, I am not sure I can do it; my file is much different than the plugins. It seems like a lot to change 2 simple images. I was thinking I can find this code and make the change. It sounds easier to me.

    In looking at my source code I found the english file at: /includes/languages/MyTemplate/english.php around lines #286 and #287. For now I changed the text.

    define('PREVNEXT_BUTTON_PREV', 'Previous');
    define('PREVNEXT_BUTTON_NEXT', 'Next');

    I know this is the defining code because the text changed where I wanted it to change. Looking up the: PREVNEXT_BUTTON_NEXT in my Developers toolkit I found several hits. But only one made sense and this is the code:

    Code:
    /MyRoot/includes/classes/split_page_results.php
    Line #109  :     if ($this->current_page_number > 1) $display_links_string  .= '<a href="' . zen_href_link($_GET['main_page'], $parameters .  $this->page_name . '=' . ($this->current_page_number - 1),  $request_type) . '" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' ">' .  PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
    In the same file I found this:

    Code:
    Line #134 :     if (($this->current_page_number <  $this->number_of_pages) && ($this->number_of_pages != 1))  $display_links_string .= '&nbsp;<a href="' .  zen_href_link($_GET['main_page'], $parameters . 'page=' .  ($this->current_page_number + 1), $request_type) . '" title=" ' .  PREVNEXT_TITLE_NEXT_PAGE . ' ">' . PREVNEXT_BUTTON_NEXT .  '</a>&nbsp;';
    This is the code that displays these buttons right? All I need to do is get my image locations in these areas to display my images? I am a little unsure as to how to put html image code in this PHP.

 

 

Similar Threads

  1. v151 Code For Previous/Next Arrows on Product Page
    By riolas in forum General Questions
    Replies: 3
    Last Post: 14 Nov 2013, 12:37 AM
  2. 2 issues additional images and previous next button
    By Mireia in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 20 Jan 2009, 04:12 PM
  3. Pictures next to Previous and Next
    By milobloom in forum General Questions
    Replies: 3
    Last Post: 24 Feb 2008, 02:32 AM
  4. Disabling Next/Previous & Product Listing images
    By emilfalcon in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Nov 2007, 10:21 PM
  5. moving previous/next images
    By etoile03 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 Jun 2006, 03:40 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