Thread: Links

Results 1 to 10 of 10
  1. #1
    Join Date
    May 2007
    Posts
    38
    Plugin Contributions
    0

    Default Links

    Hiya,

    I've been reading https://www.zen-cart.com/tutorials/i...hp?article=234
    and i have got a link to work fine using the first option But say that i want it to go to another page which is internal. How would i go it ? do i have to define it in another file or something coz i'm a bit confused on this. As i was a link to go to a products page and one to go to an about us page. I got no problem making the pages. its just the links that got be a bit stuck. I was going to use option 2 but i want them all on one navigation bar and it all to be between the Home and Login link already made.
    Please help.

  2. #2
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Re: Links

    If you got the links to show in your navigation bar (and it sounds like you have) - I am afraid that I am missing the trouble. Before I go on, understand that I am making the assumption that you are linking to a static page (as in the link will always point at the about us page, or a certain category).

    In the tpl_header.php file that you have added your link to, you can define a solid HTML a href=... tag right there.

    If I am not understanding what you are looking for, please restate your question and I'll see if I can provide you with some insite.

  3. #3
    Join Date
    May 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: Links

    Yeah its i'm not sure how to create the links... So far i used the link which they have given as an example as i wanted that one anyhow. But say i make an about us page. How would i get the link to work. I could just use the external link exam but i am moving hosting soon and it will be a pain to change all the links.
    So the really trouble i'm having is changing the code to suite me.

    Code:
        <li><?php echo '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'; ?></li>
      <?php } ?>
    Now from this i understand that the zen_href_link is the domain in which the zen cart was installed? Is that right ?

    And if so it looks up the file ame Contact Us ... Now is there somewhere where you have to define where and what file Contact us is ?

    and what does . BOX_INFORMATION_CONTACT . do ?
    and one last thing... Sorry for being annoying and all but nowhere in that statment can i see that it says that the link should be displayed as Contact Us.
    I was just wondering if someone could just give me an example and explain some of this. I'm a fast learner and once i have the basics i can carry on.

  4. #4
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Re: Links

    Believe it or not, I am checking this on the road, so I don't have the ability to pull up the Zen Cart files and verify this, however I can help you with part of this, and if nobody adresses the rest of your question, I'll get you some details soon.

    <li><?php echo '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'; ?></li>
    <?php } ?>
    I don't know how much you are familiar with PHP so I am going to outline the line here. You are having PHP echo an HTML link. It is pulling the URL from the function zen_fren_link. You are then feeding the function the parameters FILENAME_CONTACT_US to mean that you want the contact us page to be the destination of the link, and then the SSL parameter. I don't know for sure what that is for certain, it appears that you have the option to set the link to direct the page to be incrypeted (https). You then are closing the link. The BOX_INFORMATION_CONTACT is directing the application to show what to display. I don't remeber off of the top of my head how that works, but I know that you can direct the disply through the page that you are linking to with a define in the file that is being addressed. That is one of the jobs of the link function.

    Like I said, I don't have this open in front of my, so some of the details are a bit hazy, however that should get you started. Post again with specifics that I left you wondering about and I'll do my best to explain things. My experiance (as short as it has been) with Zen Cart is that it is is very complicated but it is extremly easy to use once you can figure out its personality. You should find that things like this will be consistant with simular behavior all over the app.

  5. #5
    Join Date
    May 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: Links

    <li><?php echo '<a href="' . zen_href_link(FILENAME_ABOUT_US, '', 'SSL') . '"></a>'; ?></li>
    <?php } ?>
    So do you think that should work? I think i understand it, the only thing i need to know ... Is where do you define FILENAME_ABOUT_US ?

    Any idea ?

  6. #6
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Links

    Any idea ?
    Sure. In your includes/languages/<your_language>/extra_definitions folder.

  7. #7
    Join Date
    May 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: Links

    Are you sure because i can't fine the contact us one in there
    Last edited by Crazy; 3 Jun 2007 at 01:33 PM. Reason: Add Smileys :)

  8. #8
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Links

    That's the advantage with that folder. You can create the same filename and put the definition name without having to depend on anyone as long as the filenames are reliable.

  9. #9
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Links

    There is an "About Us" Add-on in the Downloads section. If you grab it, it has complete instructions for creating new defined pages and adding links for them to the Information sidebox.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  10. #10
    Join Date
    May 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: Links

    Quote Originally Posted by Kim View Post
    There is an "About Us" Add-on in the Downloads section. If you grab it, it has complete instructions for creating new defined pages and adding links for them to the Information sidebox.
    Yeh but i want the links on the main navigation header... And there is more than just an about us page.

    TheOracle is there any chance you could give me an example

 

 

Similar Threads

  1. v150 locating specific home page image/links (currently dead links)
    By irish_1985 in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 15 Sep 2012, 09:59 PM
  2. Custom Links In Footer-Space Under Logo- And Links To Sidebar
    By Kaniki in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Sep 2010, 04:48 PM
  3. Side categories links ahove colour and width between links?
    By omerhanif in forum General Questions
    Replies: 6
    Last Post: 5 Feb 2010, 09:51 AM
  4. Replies: 1
    Last Post: 11 Jun 2007, 05:33 PM
  5. Separating the Header Links from Sidebox links in CSS
    By mommydesigns in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 May 2007, 02:42 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