Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    840
    Plugin Contributions
    0

    Default Sorting EZ_Page Footer links into columns?

    Hi All,
    Just curious to know if there is a way (from the admin) to have the ez_pages in the footer show up in three or four predetermined columns?

    For example:
    Sales Pages sort = 1 ( there are 5 of them )
    Informational Pages sort = 2 ( there are 3 of them )
    External Link Pages sort = 3 ( there are 5 of them ).

    So the front side out put would be:

    Col-One | Col-Two | Col-Three
    sale 1 | Info 1 | link 1
    sale 2 | Info 2 | link 2 etc. . .
    sale 3
    sale 4
    sale 5


    Thanks,
    John

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

    Default Re: Sorting EZ_Page Footer links into columns?

    Not from the admin but a coded standard ul will list vertically

    Code:
    	<ul>
    	<li><a href="xxxxxx">Text</a></li>
    	<li><a href="xxxxxx">Text</a></li>	 
    	<li><a href="xxxxxx">Text</a></li>
    	<li><a href="xxxxxx">Text</a></li>
    	</ul>

  3. #3
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    840
    Plugin Contributions
    0

    Default Re: Sorting EZ_Page Footer links into columns?

    Hey Kobra,
    Thanks for the quick reply! That is my plan in the end for styling. The problem is getting the ezpage links to go into the footer, in three separate columns. Which column they are placed in is based on their sort order.

    I'm working on a fix for this but there is a problem with my code. Pretty green when it comes to the php still but am giving it a bash.

    This is from includes/templates/mytemp/templates/tpl_ezpages_bar_footer.php
    PHP Code:
    <?php
    include(DIR_WS_MODULES zen_get_module_directory('ezpages_bar_footer.php'));

     if (
    sizeof($var_linksList) >= 3) { 
    $i 0;

    while(!
    $var_linkList->EOF) {
    $i++;
    $ezpContain = array('','','',);
    switch(
    $i) {
        case 
    1:
            
    $ezpContain[0] .= $var_linkList;
            break;
        case 
    2:
            
    $ezpContain[1] .= $var_linkList;
            break;
        case 
    3:
            
    $ezpContain[2] .= $var_linkList;
            
    $i 0;
            break;

    }
    // closes switch($i)
     

    // closes while (!$var_linkList->EOF . . .

    // closes if (sizeof($var_linkList . . . 

    ?>

    <table><tr>

    <td><?php
    for ($i=1$n=sizeof($ezpContain[0]); $i<=$n$i++) {  ?>

      <a href="<?php echo $ezpContain[0][$i]['link']; ?>"><?php echo $ezpContain[0][$i]['name']; ?></a>
      
    <?php // end FOR loop ?>

    </td>

    <td><?php
    for ($i=1$n=sizeof($ezpContain[1]); $i<=$n$i++) {  ?>

      <a href="<?php echo $ezpContain[1][$i]['link']; ?>"><?php echo $ezpContain[1][$i]['name']; ?></a>
      
    <?php // end FOR loop ?>

    </td>

    <td><?php
    for ($i=1$n=sizeof($ezpContain[2]); $i<=$n$i++) {  ?>

      <a href="<?php echo $ezpContain[2][$i]['link']; ?>"><?php echo $ezpContain[2][$i]['name']; ?></a>
      
    <?php // end FOR loop ?>

    </td>

    </tr></table>

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

    Default Re: Sorting EZ_Page Footer links into columns?

    That is contained/required by tpl_footer.php and other control in modules/ezpages_bar_footer.php

  5. #5
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    840
    Plugin Contributions
    0

    Default Re: Sorting EZ_Page Footer links into columns?

    Okay, I have a solution! I had to modify the modules ezpages_bar_footer.php and the includes ezpages_bar_footer.php as well.

    This is from lines 27, 28 & 29 in the modules
    PHP Code:
     $page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id'];
          
    $page_query_list_footer[$rows]['name'] = $page_query->fields['pages_title'];
          
    $page_query_list_footer[$rows]['altURL'] = ''
    I replaced it with
    PHP Code:
     $page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id'];
          
    $page_query_list_footer[$rows]['name'] = $page_query->fields['pages_title'];
          
    $page_query_list_footer[$rows]['sort'] = $page_query->fields['footer_sort_order'];
          
    $page_query_list_footer[$rows]['altURL'] = ''
    Here is a new includes
    PHP Code:
    <?php
       
      
    include(DIR_WS_MODULES zen_get_module_directory('ezpages_bar_footer.php'));
    ?>
    <?php 
    if (sizeof($var_linksList) >= 1) { ?>



    <table><tr><td>
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) { 
    if(
    $var_linksList[$i]['sort'] == 1){ 
    ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?><?php echo $var_linksList[$i]['sort']; ?></a>
      <?php  }  } // end FOR loop // end if ?>
    </td>


    <td>
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) { 
    if(
    $var_linksList[$i]['sort'] == 2){ 
    ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?><?php echo $var_linksList[$i]['sort']; ?></a>
      <?php  }  } // end FOR loop // end if ?>
    </td>


    <td>
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) { 
    if(
    $var_linksList[$i]['sort'] == 3){ 
    ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?><?php echo $var_linksList[$i]['sort']; ?></a>
      <?php  }  } // end FOR loop // end if ?>
    </td>


    <td>
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) { 
    if(
    $var_linksList[$i]['sort'] > 3){ 
    ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?><?php echo $var_linksList[$i]['sort']; ?></a>
      <?php  }  } // end FOR loop // end if ?>
    </td>

    </tr></table>




    <?php ?>

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

    Default Re: Sorting EZ_Page Footer links into columns?

    Just for fun...
    /includes/templates/mytemp/templates/tpl_ezpages_bar_footer.php
    PHP Code:
      include(DIR_WS_MODULES zen_get_module_directory('ezpages_bar_footer.php'));
    //sort links into ul lists according to first digit of sort order
    //allows ordering links within columns - use 101, 102, 201, 202...
    if (sizeof($var_linksList) >= 1) { 
      for (
    $list_col=1$list_col<=9$list_col++) { 
        
    $col_links 0;
        
    $col '<ul class="ezpagesFooterCol">';
        for (
    $i=1$n=sizeof($var_linksList); $i<=$n$i++) { 
          if(
    substr($var_linksList[$i]['sort'], 01) == $list_col){ 
            
    $col .= '<li><a href="' $var_linksList[$i]['link'] . '">' $var_linksList[$i]['name'] . $var_linksList[$i]['sort']/*<--why is this here?*/ .'</a></li>';
            
    $col_links 1;
          }
        } 
        
    $col .= '</ul>';
        if (
    $col_links == 1) echo $col;
      } 
    // end FOR loop
    // end if ?> 
    Not tested yet - you would want to style .ezpagesFooterCol {} for width, float, etc.

  7. #7
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    840
    Plugin Contributions
    0

    Default Re: Sorting EZ_Page Footer links into columns?

    Thanks Glenn. Very efficient. I'll be there someday.

    John

 

 

Similar Threads

  1. Flexible Footer Columns Menu for 1.5.x
    By rbarbour in forum All Other Contributions/Addons
    Replies: 88
    Last Post: 23 Apr 2022, 01:18 PM
  2. Ezpages Footer Columns support
    By gjh42 in forum All Other Contributions/Addons
    Replies: 151
    Last Post: 7 Jun 2021, 07:29 PM
  3. Sorting EZ-Pages Into Sideboxes
    By ojhernandez in forum Templates, Stylesheets, Page Layout
    Replies: 30
    Last Post: 27 May 2011, 07:15 PM
  4. EZ Page Footer links & Footer look different only on Home
    By DivaVocals in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Aug 2008, 11:28 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