Location: PHPKode > scripts > XMap > xmap/smarty-template.xnavigator.tpl
{if $smarty.request.u == NULL}
        {assign var="sid" value="browse_php"}
{else}
        {assign var="sid" value=$smarty.request.u}
{/if}

<h1>MyPortal.Com</h1>

<hr>
{xmap file="/projects/smarty/templates/sitemap.xml" assign="sitemap" rule="ancestor" debug=0 id=$sid invert=TRUE}
You are at ::
{foreach from=$sitemap key="id" item="map"}
        <a href="?u={$id}">{$map.name}</a> |
{/foreach}

{xmap file="/projects/smarty/templates/sitemap.xml" assign="sitemapHere" rule="here" debug=0 id=$sid}
<b><a href="?u={$sid}">{$sitemapHere[$sid].name}</a></b>
<hr>
<br>
<br>

Click on the links above to scrollback on site.
<br><br>
<hr>

Please note: this template example is the Smarty version of XNavigator, a LPGL subpackage of XMap.
Take a look on XMap at <a href="http://www.phpclasses.org/browse.html/package/581.html">PHPClasses.org</a>
or at <a href="http://freshmeat.net/projects/xmap">freshmeat.net</a>.
Return current item: XMap