Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2012
    Posts
    10
    Plugin Contributions
    0

    Default Linking to an EZ Page or Separating EZ Pages into Drop Downs

    Hi,

    I am very new to this and I suspect that this will be very simple but I don't have enough knowledge to work it out. I have googled and searched the forums but cannot find specifically what I am after.

    I haven't got a link because it is on a local host, so I apologise for the inconvenience.

    I have my EZ Pages listed in a menu:

    Trends :: Wishlists :: Gift Certificates :: About Us

    I would like to add an extra EZ Page in a drop-down menu under About Us called "Why buy from us".

    It would be good if this list was then editable in the admin to add more links etc.


    1) I have searched the forums for a way of seperating the EZ Page links in order to style some of them in a drop-down but cannot find the answer

    2) I then tried putting them in a <ul> and hard coded it like this:

    <div id="navEZPagesTop">
    <ul>

    <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) { ?>

    <li><a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a></li><?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?>
    <?php } // end FOR loop ?>
    <li class="extraUL"><a href="<?php echo zen_ez_pages_link(12) ;?>">About Us</a>
    <ul>
    <li><a href="<?php echo zen_ez_pages_link(15) ;?>">Why Buy From Us</a></li>
    </ul>

    </li>
    </ul>
    </div>


    This would work fine, except that the site is bilingual and I need the name of the link to pull in the information from the name of the EZ Page

    I really hope this makes sense!

    Thank you


    I have attached screen shots
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Picture 1.jpg 
Views:	45 
Size:	8.2 KB 
ID:	11387   Click image for larger version. 

Name:	Picture 2.jpg 
Views:	36 
Size:	9.5 KB 
ID:	11388  

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

    Default Re: Linking to an EZ Page or Separating EZ Pages into Drop Downs

    Have you looked at EZ-Pages Improved Menus in Plugins? It builds the <ul> list dynamically and is multi-lingual. There is a post in its support thread (or possibly in the EZ-Pages Footer Columns thread) to help coordinate it with the Multi-Language EZ-Pages mod.


    It does not make multi-level lists, though; you would have to put the "why buy" page in a chapter with About Us and show it in the TOC. There might be a CSS solution... I would have to look at it more.
    Last edited by gjh42; 5 Nov 2012 at 04:47 PM.

  3. #3
    Join Date
    Oct 2012
    Posts
    10
    Plugin Contributions
    0

    Default Re: Linking to an EZ Page or Separating EZ Pages into Drop Downs

    Hi, thank you for your help, it is much appreciated.

    I did have a look at EZ-pages Improved menus, I actually added it but it stopped the ez-page content displaying. I realised that it was for 1.3.9 and I am using 1.3.8a which is what I assume is causing it. I cannot upgrade because these are *supposed to be* small amendments to a clients site and upgrading would have to be costed.

    Is there no way of linking to an individual EZ Page where the title is pulled through? Even if it is effectively hard coded.

    Like, is there not a way of putting some php in between the <a> and </a> that tells it to get the title of the ez page id?

    Thanks again, I'm sorry if this comes across as a stupid question but this is only the second time I have ever been near zen cart, php and any other form of templates etc I only know basic HTML/CSS.

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

    Default Re: Linking to an EZ Page or Separating EZ Pages into Drop Downs

    The reason EZ-Pages Improved Menus would have crashed is that the multi-language mod changes a file it also changes, so it no longer gets information. It is an easy fix to add the needed information lookup to the multi-language file.
    Discussion of the issue and fix here for the footer bar:
    http://www.zen-cart.com/showthread.p...doesn-t-appear

    The fix for the "menus" mod would be similar but not identical. I need to get that sorted for the new version of the mod anyway, so I will be taking care of it soon. Then there should be no issue using the two together. I don't know of a way to call a particular language version of an ez-page using the standard functions or links - they are built for one language only.

  5. #5
    Join Date
    Oct 2012
    Posts
    10
    Plugin Contributions
    0

    Default Re: Linking to an EZ Page or Separating EZ Pages into Drop Downs

    Thank you for your help. I will do that today but I have acually resolved my problem (although probably not technically "right")

    I ended up hard coding the link where I put:

    <li><a href="<?php echo zen_ez_pages_link(12) ;?>"><?php echo ABOUT_US_HEADER; ?></a></li>

    where (12) is the id of the ez page

    And then in
    includes/languages/english/extra_definitions/my_template and
    includes/languages/cymraeg/extra_definitions/my_template

    I created files called category_menu_defines.php

    and I put this in them:

    <?php
    Define('WHY_BUY', 'Why Buy from Us');
    Define('ABOUT_US_HEADER', 'About Us');
    ?>

    Where one file had 'Why Buy from Us' and the other had it in Welsh.

    Like I said I have absolutly NO php knowledge so I have probably broken many rules and done it wrong but it has worked (for now at least)!!

    Thanks Again

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

    Default Re: Linking to an EZ Page or Separating EZ Pages into Drop Downs

    Actually that is a very good way to do it.
    Obviously a general-purpose functionality would need to make the display automatic for any ez-page without a custom define file, but what you have done is a proper way to use the built-in override and language system.

 

 

Similar Threads

  1. Dynamic Drop Downs - Display Q.
    By dthomas in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Jul 2011, 10:02 AM
  2. drop downs
    By jillybean in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 9 Apr 2010, 04:36 PM
  3. Separating add quantity and price into two columns
    By wongasta in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 26 Jun 2009, 01:05 AM
  4. Drop downs in IE
    By webrob in forum All Other Contributions/Addons
    Replies: 13
    Last Post: 3 Jul 2007, 05:25 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