SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,627
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Navigation breadcrumbs: jquery vs php vs html or other?

    Hello. I would like to implement a breadcrumb type nav for my site. I've never done this before. So a little direction would be helpful. I have 1000+ pages and no bread crumb functionality at all in any of them currently. Aside from the painful process of adding each to each pages html, is there any easier way to do this? Possibly with jQuery, php, or other? I don't want anything fancy. Just simple text links just like sitepoint. Maybe some magical simple script I can add that will read my url structure and populate them automagically.

    Thanks,
    Eric W

  2. #2
    SitePoint Member
    Join Date
    Feb 2013
    Location
    Warrenville, Illinois, United States
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most systems with a breadcrumb manager will come standard in a Framework. I will recommend php for this. The difficulty of the task ahead of you will partly rely on how your pages are currently structured (especially since you have so many). Are these flat html pages that have all been put together individually or are you using a standard template file? If they are all .html files, you will need to do one of two things (in my opinion): 1) Configure your server to allow php in your html docs, or 2) Make sure all .html files are converted to .php (simple as changing the .html to .php - which you should be able to do with a Find/Replace).

    You're going to need to keep very good track of what you are doing depending on your answer to the last couple of questions. You could theoretically use $_SERVER['HTTP_REFERER'] to track the last page (but this isn't always accurate in all browsers). The best method is to likely use a PHP SESSION Variable, but you're going to have to be careful on dealing with that so you don't end up with a "perpetual" breadcrumb string...will take some coding and tracking to do this correctly. Let me know if you need more detail.

  3. #3
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,627
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    They are all php pages coded soley by me - no framework. I actually overstated that number. Discounting the demos there are only around 400.


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
  •