Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.xnavigator.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Roberto Bertó  >  XMap  >  demo.xnavigator.php  >  Download  
File: demo.xnavigator.php
Role: ???
Content type: text/plain
Description: demo to app.xnavigator.php
Class: XMap
A PHP class to use XML Sitemaps and improve htm
Author: By
Last change: minor changes
Date: 12 years ago
Size: 943 bytes
 

Contents

Class file image Download
<h1>MyPortal.com</h1><br>
<hr>
You're at: :
<?PHP

/**
  * XNavigator Demo
  *
  * This demo shows a nice navigator. You can use this piece of code in your site
  */

#include xmap
require_once "class.xmap.php";

#include xnavigator
require_once "app.xnavigator.php";

#sitemap.xml is our source xml
$XMap = new XNavigator("sitemap.xml");

# select the id to parse
if (!empty($_GET["u"]))
{
        $id     = $_GET["u"];
}
elseif (!empty($u))
{
        $id     = $u;
} else {
        $id     = "browse_php";
}

$XMap->XNavigatorId                     = $id;
$XMap->XNavigatorSeparator              = ' -> ';
$XMap->XNavigatorHereShow               = '<b><a href="demo.xnavigator?u=%id%">%name%</a></b>';
$XMap->XNavigatorShow                   = '<a href="demo.xnavigator?u=%id%">%name%</a>';

print $XMap->XNavigatorCreator();
?><hr>
<br>
<br>

Click on the links above to scrollback on site.