/ Published in: Apache
                    
                                        
Simple way to generate dynamic sitemap with CMS Made Simple
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
//Add to HTACCESS
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^sitemap.xml$ index.php?page=sitemap&showtemplate=false [L]
RewriteRule ^sitemap.html$ http://www.domain.com/index.php [R=301,L]
//CREATE PAGE CALLED SITEMAP AND INSERT THIS SMARTY TAG
{menu template='google_sitemap' show_all=1 collapse=0}
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
{if $count > 0}
{assign var='now' value=$smarty.now|strtotime}
{foreach from=$nodelist item=node}
{if $node->alias !== "sitemap"}
<url>
<loc>{$node->url}</loc>
<lastmod>{$node->modified|date_format:'%Y-%m-%dT%T-08:00'}</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
{/if}
{/foreach}
{/if}
</urlset>
URL: http://forum.cmsmadesimple.org/viewtopic.php?f=4&t=39258
Comments
 Subscribe to comments
                    Subscribe to comments
                
                