Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2012
    Posts
    10
    Plugin Contributions
    0

    Default linking a picture on main page to a category

    hi, what i want to do is have 3 pictures on my main page that when you click them take you to their respective catagories.

    atm i have them in the define_main_page.htm file so they load up on the main page.

    what do i type for the link address or how do i do it ? ive got

    Code:
    <a href=""><img src="images/banner1.jpg" width="200" height="200" alt="Adults" title="Adults" /></a>
    <a href=""><img src="images/banner1.jpg" width="200" height="200" alt="Kids" title="Kids" /></a>
    <a href=""><img src="images/banner1.jpg" width="200" height="200" alt="Fightware" title="Fightware"
    how do i actually link them to the catagory pages though ?

    i feel like im going about this the wrong way

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    18,031
    Plugin Contributions
    1

    Default Re: linking a picture on main page to a category

    What you have is fine, but you need to put the path to the categories inside the quotes here: <a href="">. You can navigate to the category in question and Copy the URL from the browser address bar and Paste it in the <a href="">tag. In a stock Zencart installation with sample products, the link to the Hardware category would look like this:
    <a href="http://www.stevesh.org/demo/index.php?main_page=index&cPath=1">

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    20,961
    Plugin Contributions
    25

    Default Re: linking a picture on main page to a category

    You have done nothing wrong; you simply need to add the URL for each category page to the href="" section. Go to the correct page, copy the URL from the address bar, and paste it into your code.

    IMPORTANT: do not include any &zenid=xxxxxxx that may be shown. Also, make the URL relative instead of absolute by stripping the www.yoursite.com/ from the front, leaving only index.php?main_page=index&cPath=123 or whatever your exact path is.

  4. #4
    Join Date
    May 2009
    Posts
    731
    Plugin Contributions
    0

    Default Re: linking a picture on main page to a category

    Are Adults, Kids, and Fightware, your only categories?
    If yes you could just enable the categories to alway show on mainpage, and associate the image in the category creation.

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

    Default Re: linking a picture on main page to a category

    at the moment they are, but there may be more added later im not sure, just setting this up atm. thanks for you help guys :)

 

 

Similar Threads

  1. Setting different number of rows and picture sizes than the main category
    By willie bee in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Nov 2011, 07:57 AM
  2. picture on main page
    By jillybean in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 May 2010, 04:26 PM
  3. Category Linking problem on Main Page (Suspected Reading of Database)
    By denbuzz in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 29 Oct 2009, 03:33 AM
  4. Restrict main page picture from showing in pages other than home page
    By dealbyethan.com in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Apr 2007, 05:33 PM
  5. Replies: 2
    Last Post: 31 Oct 2006, 08:29 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
  •