Return to Snippet

Revision: 40508
at June 1, 2011 03:09 by nielsenrc


Updated Code
//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>

Revision: 40507
at June 1, 2011 03:08 by nielsenrc


Updated Code
//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 start_element="6"}

<?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>

Revision: 40506
at March 12, 2011 05:20 by nielsenrc


Updated Code
//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>

Revision: 40505
at March 10, 2011 05:42 by nielsenrc


Updated Code
//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.rushplumbingseattle.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>

Revision: 40504
at March 10, 2011 05:40 by nielsenrc


Updated Code
<?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>

Revision: 40503
at March 3, 2011 09:50 by nielsenrc


Updated Code
//Create a MenuManager template called "google_sitemap" and insert this code in template:

<?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}
<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>
{/foreach}
{/if}
</urlset>

//Create Page Called sitemap and dump this code:

{menu template='google_sitemap' show_all=1 collapse=0}

//Add this code underneath RewriteEngine ON

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^sitemap.xml$ index.php?page=sitemap&showtemplate=false [L]

Revision: 40502
at March 3, 2011 02:16 by nielsenrc


Updated Code
//Create a MenuManager template called "google_sitemap" and insert this code in template:

<?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}
<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>
{/foreach}
{/if}
</urlset>

//Create Page Called sitemap and dump this code:

{menu template='google_sitemap' show_all=1 collapse=0}

//Add this code to top of htaccess

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^sitemap.xml$ index.php?page=sitemap&showtemplate=false [L]

Revision: 40501
at March 2, 2011 04:13 by nielsenrc


Updated Code
//Create a MenuManager template called "google_sitemap" and insert this code in template:

<?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}
<url>
    <loc>{$node->url}</loc>
    <lastmod>{$node->modified|date_format:'%Y-%m-%dT%T-08:00'}</lastmod>
    <changefreq>{assign var='mod' value=$node->modified|strtotime}{math assign='age' equation="(n-m)/86400" n=$smarty.now m=$mod}{if $age < 2}hourly{elseif $age< 14}daily{elseif $age < 30}weekly{else}monthly{/if}</changefreq>
    <priority>0.5</priority>
  </url>
{/foreach}
{/if}
</urlset>

//Create Page Called sitemap and dump this code:

{menu template='google_sitemap' show_all=1 collapse=0}

//Add this code to top of htaccess

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^sitemap.xml$ index.php?page=sitemap&showtemplate=false [L]

Revision: 40500
at February 3, 2011 02:12 by nielsenrc


Initial Code
//Create a MenuManager template called "google_sitemap" and insert this code in template:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.90">
{if $count > 0}
{assign var='now' value=$smarty.now|strtotime}
<url>
{foreach from=$nodelist item=node}
<url>
    <loc>{$node->url}</loc>
    <lastmod>{$node->modified|date_format:'%Y-%m-%dT%T-08:00'}</lastmod>
    <changefreq>{assign var='mod' value=$node->modified|strtotime}{math assign='age' equation="(n-m)/86400" n=$smarty.now m=$mod}{if $age < 2}hourly{elseif $age< 14}daily{elseif $age < 30}weekly{else}monthly{/if}</changefreq>
    <priority>0.5</priority>
  </url>
{/foreach}
{/if}
</urlset>

//Create Page Called sitemap and dump this code:

{menu template='google_sitemap' show_all=1 collapse=0}

//Add this code to top of htaccess

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^sitemap.xml$ index.php?page=sitemap&showtemplate=false [L]

Initial URL
http://forum.cmsmadesimple.org/viewtopic.php?f=4&t=39258

Initial Description
Simple way to generate dynamic sitemap with CMS Made Simple

Initial Title
CMS Made Simple Google Sitemap

Initial Tags

                                

Initial Language
Apache