NAVIGATION
This is an old revision of the document!
Enhanced version for using a start-Id in tree against a domain.
// Your strukture ID -> where would you like to start your sitemap? $my_start_id = 22; //default if no domain name is given // All Cat-IDs which have to be excluded permanently e.g. '4,7,34,9' $_DISABLE_ID = '4,7,34,9'; // Test // Add the respective START ID corresponding with your domain: remove comment slashes and enter them $_DOMAIN_ID = array( // 'domain1.de' => array( 'ID' => 1 ), // 'domain2.com' => array( 'ID' => 3 ), // 'domain3.ch' => array( 'ID' => 11 ), );
<note>Available for persons those who write useful contributions into the wiki. (Alternatively make an donation).</note>
Forum: http://forum.phpwcms.org/viewtopic.php?p=112317#p112317
Rewriting sitemap output with /sitemap.php for sitemap.xml file. (index.php?alias → /alias.phtml)
Normaly the rewrite to alias.phtml is a htaccess funktion via apache.
Patch for sitemap.php: (But only if you are using a standard .htaccess and rewrite to alias.phtml)
Begin:
require_once (PHPWCMS_ROOT.'/include/inc_front/front.func.inc.php');
Insert:
// enhanced by k.Heermann (flip-flop) for rewriting to alias.phtml // --------------------------------------------------------------- +kh 09/01/06 $my_rewrite = false; if ($phpwcms['rewrite_url'] >= 1 AND file_exists('.htaccess')) { $my_rewrite = true; } // ----------------------------------------------------------------
End:
// start XML echo '<?xml version="1.0" encoding="utf-8"?>'.LF;
and
$_link = PHPWCMS_URL.'index.php?'.setGetArticleAid( $data );
with:
// ---------------------------------------- +kh 09/01/06 if ($my_rewrite) { $_link = PHPWCMS_URL.setGetArticleAid( $data ).'.phtml'; } else { $_link = PHPWCMS_URL.'index.php?'.setGetArticleAid( $data ); } // ----------------------------------------