Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1. #1
    Join Date
    May 2010
    Posts
    67
    Plugin Contributions
    0

    Default Sorting EZ-Pages Into Sideboxes

    Hello,

    I've tried searching the forum and have kind of found what I've been looking for but I don't exactly understand it.

    My main issue is that I need to clone the "sideboxes/ezpages.php" sidebox.

    But after I do this, I need to take an extra step and make some EZ-Pages appear in one sidebox and some appear in another.

    Basically, let's say I have four EZ-Pages, named "A," "E," "C," and "D."

    I then have two EZ-Page sideboxes named "Vowels" and "Consonants"

    The pages would then have to be sorted this way:

    Vowels: A E

    Consonants: C D

    How can I do this?

    Thanks In Advance ,

    ojhernandez

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Sorting EZ-Pages Into Sideboxes

    My guess is that this is not that easy... You may need to duplicate a lot more than just the sidebox, because EZPages are stored in the database, and are not files like the define pages.

    You may be able to build something that creates a flag on a page ID, where the flag identifies the relevant sidebox, so when you create a page you would at that point specify what sidebox is needs to relate to.

    Whatever solution, it will require many files to be edited, and most certainly some changes/additions to the database.
    20 years a Zencart User

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

    Default Re: Sorting EZ-Pages Into Sideboxes

    Actually, it would not be that difficult to make a basic filter, and would only require adding code to the two ez-page sidebox module files.
    PHP Code:
          $box_id =  'ezpages';
          
    $rows 0;
          while (!
    $page_query->EOF) {
            if (
    in_array($page_query->fields['pages_id'], explode(',''1,3,5,7,11'))) { //list of ez-page ids to display in this box

            //existing code

            
    //in_array
            
    $page_query->MoveNext();
          } 
    Alternate:
    PHP Code:
            if (in_array($page_query->fields['pages_id'], explode(','EZPAGES_SIDEBOX_LIST))) { //list of ez-page ids to display in this box 
    and in a language file
    PHP Code:
    define('EZPAGES_SIDEBOX_LIST''1,3,5,7,11');
    define('EZPAGES2_SIDEBOX_LIST''2,4,6,8,9,10'); 

  4. #4
    Join Date
    May 2010
    Posts
    67
    Plugin Contributions
    0

    Default Re: Sorting EZ-Pages Into Sideboxes

    I appreciate your reply!

    Have you heard of anyone who has done this?

    Maybe with some documentation on how to implement this?

    Thanks In Advance,

    ojhernandez

  5. #5
    Join Date
    May 2010
    Posts
    67
    Plugin Contributions
    0

    Default Re: Sorting EZ-Pages Into Sideboxes

    Quote Originally Posted by gjh42 View Post
    Actually, it would not be that difficult to make a basic filter, and would only require adding code to the two ez-page sidebox module files.
    I just saw your reply!

    So basically (Since my knowledge of PHP is certainly lacking), the sidebox is just calling EZ-Pages with certain IDs which I determine?

    I apologize for the inconvienence but could you please explain what the code does and where do I add it to?

    Thank You So Much!

    ojhernandez
    Last edited by ojhernandez; 14 May 2011 at 07:44 PM. Reason: Fixed the Broken "QUOTE" Tag.

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

    Default Re: Sorting EZ-Pages Into Sideboxes

    Assuming you understand the basic process of cloning a sidebox and using the template override system (or can read the tutorials on those subjects), you would add the two lines to /includes/modules/sideboxes/your_template/ezpages.php and ezpages2.php
    PHP Code:
            if (in_array($page_query->fields['pages_id'], explode(',''1,3,5,7,11'))) { //list of ez-page ids to display in this box

            
    //in_array 
    in the locations shown above.

  7. #7
    Join Date
    May 2010
    Posts
    67
    Plugin Contributions
    0

    Default Re: Sorting EZ-Pages Into Sideboxes

    I'm sorry for my confusion but in your original reply you had three code boxes.

    Which ones do I use? Also, one mentioned language files.

    Where does each code snippet go?

    Thank You So Much!

    ojhernandez

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

    Default Re: Sorting EZ-Pages Into Sideboxes

    The second and third boxes are an alternate method - more flexible and elegant, but not to worry about if they confuse you. Just use the one I described first and expanded on.

  9. #9
    Join Date
    May 2010
    Posts
    67
    Plugin Contributions
    0

    Default Re: Sorting EZ-Pages Into Sideboxes

    Thank You for all your help!

    Can you please direct me to the tutorial for cloning a sidebox?

    I have seen several posts on this and don't want to choose the right one.

    Thanks,

    ojhernandez

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

    Default Re: Sorting EZ-Pages Into Sideboxes

    If you don't want to choose the right one, then you probably won't want to look at this forum thread ;)
    how to add an additional sidebox

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Sorting Product List pages by order popularity
    By Cozmoz in forum Code Collaboration
    Replies: 16
    Last Post: 1 Dec 2014, 11:04 AM
  2. How to add more pages into "Information"? (sideboxes/information.php)
    By n_t_r in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 May 2011, 01:50 PM
  3. Copyright bleeding into sideboxes
    By xavioremu in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 May 2010, 09:45 PM
  4. Sorting EZ_Page Footer links into columns?
    By bumba000 in forum General Questions
    Replies: 6
    Last Post: 4 Oct 2009, 05:36 AM
  5. Pulling Sideboxes into non zencart pages
    By halfwitt in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Aug 2007, 02:51 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