Results 1 to 8 of 8
  1. #1
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    PHP Menu Script
    I have been looking around for a PHP menu that I can load from a feed that would show categories and subcategories. I'm not sure what to look for in terms of SE friendly. Most I have found so far depend heavily on javascript.

    I finished Dirk's Bulletproof tutorial and it left me wondering how to handle the multilevel categories so I'm trying to blend a menu script with his ideas.

  2. #2
    Full Member suzie250's Avatar
    Join Date
    May 5th, 2005
    Posts
    416
    I worked around this by using a parent column in my table. (I actually have two tables, one for categories and then one for products.)

    All categories and subcategories are listed in the category column with a different id. Then in the parent column the subcategories are related to it's main category.

    Something like this:
    Clothing CatId is 1 Parent category is 0
    Mens CatId is 2 Parent category is 1
    Womens CatId is 3 Parent cateogry is 1

    and so on...
    I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Bud Lite than Kay.

  3. #3
    ABW Ambassador Greg Rice's Avatar
    Join Date
    January 18th, 2005
    Location
    Ohio
    Posts
    4,889
    Not sure if this the best way, but what I do run queries for my categories and put them into each page (I have about 6 pages per merchant so this isn't a big deal). My query uses "select DISTINCT PriCat (my primary category name) from TableName. This will only show each category name once. Then I use an include file to display the categories on each page and they link to a category page.
    Greg Rice Affiliate Program Management
    www.gocmc.com info(AT)gocmc.com | 330-259-1223

    Join us! - MiNeeds.com | DiscountCandleShop/CheeseSupply | Feng Shui Plaza

  4. #4
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    This site turned up by Chip Chapin. He has done a study on the various types of menus and reviews some scripts. I am learning from phpLayersMenu right now. It's PHP with or without javascript and the Demo is here for v 2.2 but version 3 is out.

  5. #5
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    That can be a "cool" feature, but don't forget to use a plain HTML version of the same categories so the search engine bots can spider them.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  6. #6
    ABW Ambassador FFoc's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,015
    Agreed. Do yourself a favor and use Lynx to view your site while you're playing with it.

    If you use Linux, it's already there. Windows users can get a copy from one of the links on this page: http://www.fdisk.com/doslynx/lynxport.htm

    If you can't make sense of it with Lynx, the SE robots won't, either.

  7. #7
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    Agreed. Do yourself a favor and use Lynx
    Very spooky! I installed Lynx yesterday on Suse 9.3 and have a post over at another forum trying to figure out what the path is to run it. I tried /usr/bin/lynx on command prompt, but no luck. I can't seem to find the executable and that's not surprising since I don't play with Linux often enough to remember it's ways.


  8. #8
    ABW Ambassador FFoc's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,015
    That's where it's located in Debian..

    You can do search for it the slow but reliable way by doing "find / -name lynx" from command line.

    Be warned, it'll spit out a bunch of 'permission denied' warnings at you if done as an ordinary user..

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. I need help with a php drop down menu
    By tsmgroup2 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: June 26th, 2007, 01:18 AM
  2. [php] Self-Updating Select Menu
    By mobilebadboy in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: April 6th, 2006, 10:05 AM
  3. need help with php script
    By oscar in forum Programming / Datafeeds / Tools
    Replies: 15
    Last Post: June 29th, 2004, 05:15 PM
  4. CSS/script menu problem
    By SpikeDo in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: September 17th, 2003, 08:00 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
  •