Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2010
    Location
    crewe
    Posts
    41
    Plugin Contributions
    0

    Default Defining new links in menu bar

    Hello, I added some html links to the menu bar, but now I need them in different language as well. I installed Serbian language pack, but I still have my links in the top menu in English. I decided to define the links in PHP, so I went to includes/languages/english/classic/header.php and added stuff like
    define('HEADER_TITLE_ABOUT' , 'About us'); instead the html so that I could easily switch between English and Serbian,
    but when I add it to tpl_header.php as a link it shows only the "HEADER_TITLE_ABOUT" rather than "about us". The same problem occurs when it comes to Serbian version. Has anyone got a clue what to do about it?
    Kind regards

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

    Default Re: Defining new links in menu bar

    It may help to see the site live. Also, please post the section of tpl_header.php where you added links.

  3. #3
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Defining new links in menu bar

    this is how i did it. hope it helps



    includes>languages>your template>english.php
    Code:
    // top navigation menu text
      define('TOP_MENU_BP', 'Barnett Performance');
      define('TOP_MENU_STORE_HOME', 'Store Home');
      define('TOP_MENU_MAIN_SITE', 'T&J Main Page');
      define('TOP_MENU_NEW_PRODUCTS', 'New Products');
      define('TOP_MENU_SPECIALS', 'Specials');
      define('TOP_MENU_VIEW_CART', 'View Cart');
      define('TOP_MENU_MY_ACCOUNT', 'My Account');
    includes>templates>your template>common>tpl_top_nav.php
    Code:
    <?php
    if ($current_page_base == 'T&J_Main_Page') {	$active	= 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li id="<?php echo $active;?>"><a href="http://www.tandjperformance.com"><?php echo TOP_MENU_MAIN_SITE;?></a></li>
            
            <?php
    if ($current_page_base == 'T&J_Store_Home') {	$active	= 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li id="<?php echo $active;?>"><a href="http://www.tandjperformance.com/store"><?php echo TOP_MENU_STORE_HOME;?></a></li>
            
            <li id="<?php echo $active;?>"><a href="http://www.barnettperformance.net"><?php echo TOP_MENU_BP;?></a></li>
    <?php
    
    if ($current_page_base == 'products_new') {	$active	= 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li id="<?php echo $active;?>"><a href="index.php?main_page=products_new"><?php echo TOP_MENU_NEW_PRODUCTS;?></a></li>
    
    <?php
    if ($current_page_base == 'specials') { $active = 'tab_active'; 
    	} else { $active = '';
    }?>
    		<li id="<?php echo $active;?>"><a href="index.php?main_page=specials"><?php echo TOP_MENU_SPECIALS;?></a></li>
    my zens
    tandjperformance.com - socaloffroad.net - barnettperformance.net - vintageoctane.com

  4. #4
    Join Date
    Sep 2010
    Location
    crewe
    Posts
    41
    Plugin Contributions
    0

    Default Re: Defining new links in menu bar

    Hi,
    I defined the link in different file (english.php and serbian.php in languages) and than used that definitions in tpl_header.php and now everything is fine. I must have used a wrong file previously.
    Thanks a lot :)

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

 

 

Similar Threads

  1. v154 Error message when creating new items on menu bar
    By AbbyTan in forum General Questions
    Replies: 1
    Last Post: 16 Sep 2015, 02:21 AM
  2. v150 Edit top menu bar to always highlight one of the links
    By coreyalderin in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 21 Aug 2012, 01:01 PM
  3. Colons between links in EZ Page menu bar
    By needhelpwiththis in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Apr 2010, 03:36 PM
  4. Menu Bar Links not displaying with French Language Pack
    By longtall in forum Addon Language Packs
    Replies: 4
    Last Post: 4 Sep 2008, 03:31 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR