Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Questions about adding text & links to footer

    1) I was reviewing previous posts about adding text (no hyperlinks) to a footer and followed the directions of this old thread....

    http://www.zen-cart.com/forum/showthread.php?t=108238

    It added my footer text, however it did not add to the correct area. If you check my site at http://animalsuperstore.com/zenpro/index.php you will see that it didn't add to the green grass area like the other links I've been adding. Anyone know how I can fix this?

    2) Also, I was also adding the links and if you noticed the first link in my footer has a "colon" in front of it?!? I could only think it's because I started my sort order at 1 instead of 0, but that disables it if you use 0. How can I get rid of that? And possibly the one at the end of the last link before the next link on the bottom? Doesn't make sense if the link is on the bottom.

    3) Lastly, is there a way to even out the links in the footer? Like as you can see in my site, I have 7 links on top and one all by itself on the bottom. Can it someone be set to evened up like 4 and 4 on each line?

    Thanks in advance!

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Questions about adding text & links to footer

    1. You want to investigate EZ Pages. A page can be a whole new page or it can be simply a link to an existing page (either external or internal) So, you can create pages that are the links you require and then specify that they get added to the footer menu.

    2. Don't know but suspect that possibly someone has edited the footer file that creates the menu to remove the link to the home page but has not got it quite right. The file is:

    includes/templates/yourtemplate/common/tpl_footer.php

    3. Yes, this is possible with a bit of php coding but I would wait until you have the final list of links confirmed first.

  3. #3
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Questions about adding text & links to footer

    Thanks for the quick reply!

    1) I have been using the the EZ Pages but this is the first time I'm using it for footers! From my understanding, the EZ Pages will only put hyperlinks at the footer and not static text. That's why I edited the tpl_footer.php file as explained in that other forum to add my copyright and other text. If there is a way to add static text using the EZ Pages, please let me know how.

    2) I don't see anything in that file that dealt with colons but maybe it's calling to somewhere else? I'm not a strong coder, but get by.

    3) I don't know php so I will propably just have to deal with it for now and like you said, see how many links I'll have in the long run.

    Thanks!

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Questions about adding text & links to footer

    OOPS.

    yes I understand what you mean by the text now. I was looking at the links above 'Dog' etc. sorry.

    As far as the colon goes the chunk of code you are looking at in tpl_footer looks like this:

    Code:
    <!--bof-navigation display -->
    <div id="navSuppWrapper">
    <div id="navSupp">
    <ul>
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    <?php if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
    <li><?php require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li>
    <?php } ?>
    </ul>
    </div>
    
    <!--eof-navigation display -->
    It forms a list the first element of which is a link to the home page and then the EZ pages if enabled. So, if you simply take out the home page then the colons will be wrong. And yes you are right - in order to construct the EZ Page list is calls :

    tpl_ezpages_bar_footer.php

    So, you have two options. Either put a link in before the EZ Page list as the home page was or edit tpl_ezpages_bar_footer to remove that colon. Which will involve a conditional to test if it is the first occurance of the colon.

    While we are looking at that chunk of code you can see the <div> structure clearly. For text to be in the green as it stands you need the text to be inside #navSuppWrapper so you could just put it in there, preferably inside its own div.

    The other option here is to color the lower block green as well which would be in the stylesheet. There have been a few modifications to your install so that might just take a bit of working out.

    PS. Your footer file must be a little bit different to e creating the result you have, so you will need to work out the differences I am afraid.
    Last edited by niccol; 2 Dec 2009 at 10:52 AM.

  5. #5
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Questions about adding text & links to footer

    If you want to simply remove that colon then the chunk of code (in tpl_ezpages_bar_footer) that you are concerned with looks like this:

    Code:
    <?php echo ($i <= $n ? EZPAGES_SEPARATOR_FOOTER : '') . "\n"; ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a>
    You could try changing it to:

    Code:
    <?php echo (($i <= $n && $i!=1) ? EZPAGES_SEPARATOR_FOOTER : '') . "\n"; ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a>
    Haven't tested that but give it a go.

    OR:

    Code:
    <?php
    if ($i==1){
    }
    elseif ($i==4){
    echo '<br/>';
    }
    else{
    echo EZPAGES_SEPARATOR_FOOTER;
    }
    ?>
    <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a>
    And that should break the row after four entries. Again not tested but give it a go.

  6. #6
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Questions about adding text & links to footer

    I've been up all night working on this site, so I'm going to try to get some sleep now and I'll give your suggestions a try tomorrow. I'll come back and post how it goes.

    Thanks again Nick for your reply!

  7. #7
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Questions about adding text & links to footer

    Sorry, I was delayed to try your suggestions above. I had to go to the hospital cause I broke my foot. Home and more alert now.

    Your suggestions worked great for the most part.

    1) FIXED - Added my footer text in the <div> brackets and it looks great now.

    2) Semi fixed - First colon is removed, but now I have two colons between each link. Hopefully, when I figure out how to get rid of the extra colon it will get rid of the one on the end as well.

    3) Mostly worked - It put 3 links on top and 5 below. I changed the 4 to a 5 and now it's even. So works now!

    http://animalsuperstore.com/zenpro/index.php

    I really appreciated the extra time you took to create the code suggestions. It's really appreciated!

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Questions about adding text & links to footer

    1. Great - yes it looks better, doesn't it?

    2. OK, that's a bit strange. Can you post all the code from your tpl_ezpages_bar_footer file, please. Something must be awry! Either zip the file and attach it, or as it is a small file just post the code in to the post.

    3. Yes that was my error. Well spotted! You see you are becoming a coder. :-) Of course, the break comes before the 5th item not before the 4th item. Duh!

    Hope your foot is better. How did you do it? Kicking the wall in frustration is a bad idea.
    Last edited by niccol; 5 Dec 2009 at 10:43 AM.

  9. #9
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Questions about adding text & links to footer

    That's funny about kicking the wall in frustration! Felt like it at times or throwing my laptop into the pool. Just dropped something on it cleaning my closet. On pain pills now so hopefully my brain doesn't mess up coding any worse than my brain on NO meds would do

    Here's the code...

    Code:
      include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_footer.php'));
    
    ?>
    
    <?php if (sizeof($var_linksList) >= 1) { ?>
    
    <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) {  ?>
    
    <?php echo (($i <= $n && $i!=1) ? EZPAGES_SEPARATOR_FOOTER : '') . "\n"; ?>
      
      <?php
    if ($i==1){
    }
    elseif ($i==5){
    echo '<br/>';
    }
    else{
    echo EZPAGES_SEPARATOR_FOOTER;
    }
    ?>
      
      <a href="<?php echo $var_linksList[$i]['link']; ?>">
    
      <?php echo $var_linksList[$i]['name']; ?></a>
     
    
    <?php } // end FOR loop ?>
    
    <?php } ?>

  10. #10
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Questions about adding text & links to footer

    Well, we all kick the wall at times!

    Yes, you have an extra line in there.

    Code:
    <?php echo (($i <= $n && $i!=1) ? EZPAGES_SEPARATOR_FOOTER : '') . "\n"; ?>
    Delete it - it should have been replaced by the additional code.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Adding links to footer 'Important Links' box
    By gwyllion in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Jul 2012, 05:29 PM
  2. Adding links to the header & footer
    By Shane78 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 25 Feb 2009, 10:24 PM
  3. 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
  4. Questions about the footer
    By estrange in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 10 Jul 2007, 12:55 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