RE: [PHP] "location bar"
| From: | Kurth Bemis | Date: | Tue, 14 Aug 2001 15:39:55 +0000 |
| Subject: | RE: [PHP] "location bar" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62658@lists.php.net to get a copy of this message | ||
At 11:02 AM 8/14/2001, Kevin L wrote:
I had a similar problem.....jason murray gave me some ideas ;-)
just stick this in a function as I did and you'll be sailing.....its easy to update, and Extremely flexible.
look at my code..
<font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Location : <a href="http://www.usaexpress.net">Home</a> / <?php
$patharray = explode ("/",$SCRIPT_NAME);
$scriptname = basename($SCRIPT_NAME);
for ($dirsi = 1; $dirsi < count($patharray); $dirsi++){
$dirs = array(
'company' => 'Company',
'services' => 'Services',
'support' => 'Support',
'mac' => 'Mac',
'winnt' => 'Windows NT',
'win9x' => 'Windows 9X',
'unix' => 'Linux And Unix',
'customers' => 'Customers',
'noc' => 'NOC',
'help' => 'USAexpress.net Help'
);
$linkdes = $dirs[$patharray[$dirsi]];
$link = $link . "/$patharray[$dirsi]";
if ($patharray[$dirsi] == $scriptname){
$linkdes = $title;
$slash = "";
$linkhtml = "<a href=\"$link\">$linkdes</a>$slash";
if ($patharray[$dirsi] == "index.php"){
$link = "";
$linkdes = "";
$slash = "";
$linkhtml = "";
}
}else{
$slash = " / ";
$linkhtml = "<a href=\"$link\">$linkdes</a>$slash";
}
echo $linkhtml;
}?></font> you can see it in action at www.usaexpress.net. look at the "location" below our logo. ~kurth
The navigation system you are refering to is called breadcrumb navigation. You can find implementations of this all over the place. Try hotscripts.com or google.com. Kevin -----Original Message----- From: Wolfgang Schneider [mailto:schneider@bibelcenter.de] Sent: Tuesday, August 14, 2001 12:35 AM To: php-general Subject: [PHP] "location bar" Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re "location bar" How can a location bar such as the sample below be generated in php to be displayed in web pages ...Location : home:/category:sub_1:/page titleIs there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net