Jump to content

Another breadcrumbs question


AdRock

Recommended Posts

I have been hunting for ages to find a breadcrumbs script similar to what is used here but I am having no luck.

 

I have searched Google and tried everyone I can find but i can't get any of them to work.  Most of the examples I have found give you the code but give no explanation on how to use them.

 

I found on an old post that someone mentioned looking at here

http://www.evolt.org/article/Breadcrumbs_for_PHP_Lovers/17/4455/index.html

 

I tried using the code example and all it does it print out all the code on one long line and at the end I get an error message saying

Fatal error: Call to undefined function breadCrumb() in d:\Apache\Apache\htdocs\index.php on line 13

 

I have also tried using the example given at http://www.zend.com/zend/spotlight/breadcrumb28.php which looks pretty much straight forward but when i use it, it opens a blank page

 

Does anybody know how to use either of these examples or knpw of anywhere there is an example that is easy to use?

 

Link to comment
https://forums.phpfreaks.com/topic/41941-another-breadcrumbs-question/
Share on other sites

i know nothing about these examples, however i have built my own intuative script.

 

NOW...and its a biggy

 

You can have it BUT

 

a) the site must be well structured in terms of its directories and subdirectories and

b) the copyrigt notice STAYS in place.

 

give me some examples of links in your site and I will either post it directly or post it with amendments to help

 

Will

I have used mod rewrite to rewrite my urls

 

Here is some examples of my urls

 

These are all in the base directory and I have used mod rewrite to create a fake directory called archive so appear as

www.mydomain.com/archive/news

<li><a href="/archive/news">News / Events</a></li>
<li><a href="/archive/honeylands_news">Honeylands News</a></li>
<li><a href="/archive/articles">Articles</a></li>
<li><a href="/archive/events">Events</a></li>

 

These are also in the base directory but they are normal links so appear as

www.mydomain.com/news

<li><a href="/news">News / Events</a></li>
<li><a href="/honeylands_news">Honeylands News</a></li>
<li><a href="/articles">Articles</a></li>

 

I use a switch to select the page urls like this (you will be able to see that I have archive_events which appears as archive/events)

 

<?php
	switch ($_GET['page'])
    		{

	case "archive_articles":
	include('archive_articles.php');
	break;

	case "archive_events":
	include('archive_events.php');
	break;

	case "archive_news":
	include('archive_news.php');
	break;

	case "archive_honeylands_news":
	include('archive_honeylands_news.php');
	break;

	case "articles":
	include('articles.php');
	break;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.