Site Map (How to Recreate) Started April 12, 2005 @ 3:12pm by otter
(This thread is currently Locked)
otter Administrator
Posts: 158
Site Map (How to Recreate)
April 12, 2005 @ 3:12pm
If your Site Map page is accidentially deleted from your FlexCMS site, simply follow the directions below to recreate it.
SITE MAP HOW TO
1) Create a New Page
2) Page Name: sitemap
3) Copy and paste the following code into the Custom Page Contents area.
Code
$query = "select * from `".$Settings['DBPrefix']."core-Pages` where PageLink!='".$Arguments2."' and HidePage!='y' and PageEnabled='1' and MinLevel<=".$UserLevel." and ".time().">=StartDate and ".time()."<=if(EndDate>0,EndDate,4294967295) order by PageTitle asc";
$result = mysql_query($query) or die (mysql_error());
// if any rows are returned if (mysql_num_rows($result) != 0) {
while ($row = mysql_fetch_array($result)) {
if ($row['PageLink'] == '') { $row['PageLink'] = $row['PageID']; }
4) Check the box: Process PHP Code? located under the Custom Page Contents area.
5) Save your page.
Then just view your sitemap page from the Pages area of your control panel. And, don't forget to link your sitemap page in a block so your visitors will find it.
Note: If you don't want a page to appear in the public sitemap list, be sure to check the "Hide from Directories" box located near the bottom of every page in edit mode. The same applies for page categories.
If you have any questions, please post a topic in the General Support Request board and we'll be happy to further assist you.