, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > FAQ's: General > Site Map (How to Recreate)

FlexCMS Support Forum


Site Map (How to Recreate)
Started April 12, 2005 @ 3:12pm by otter
(This thread is currently Locked) 
otter
Administrator



Posts: 177
 
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'];
}

print '<br>- <a href="'.$MainURL.'/pages/'.$row['PageLink'].'.html">'.$row['PageTitle'].'</a>';

}
}


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.


ONLINE TRAINING CLASSES FOR FLEXCMS IN MAY: FlexCMS Basics (101), Sat., May, 15, 2010 & FlexCMS Blocks (Mon., May 10, 2010).
 

(This thread is currently Locked) 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.21904 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS