Sign In
Start Page | Recent Changes | All Pages | Orphan Pages | Junebug Help

Comparing version 8 and version 7

Every site needs a sitemap, and Radiant can generate one automatically for the whole site and provide a simple way to exempt pages from the sitemap, all with the built in functionality! 

h2. A Regular Sitemap

h3. Step One

Create a child of the homepage titled @Sitemap@, or something similar, and somewhere in its Body part enter the following:


 
h3. Step Two Create a [[Snippets|snippet]] titled @sitemapper@ and contains:

 
   
     
  • _Note that the tag @@ was introduced in version 0.6.4 of Radiant. It is possible to create a sitemap without this tag, but it may not pass w3c validation, because it will output an empty @
      @._ h3. Step Three (Optional) Add a new "Page Part" titled @no-map@ to pages that you do not wish to appear in the Site Map, such a Stylesheet page and the Sitemap page itself. h2. A Google Sitemap Using a derivative of the above technique you can also generate a "sitemap.xml":http://en.wikipedia.org/wiki/Sitemaps to submit to Google and the other major search engines. h3. Step One First create a new [[Layouts|layout]] with @text/xml@ as "Content-Type", and the following content:
      
       
       
         
       
      
      h3. Step Two Create a Google Sitemap page, with @sitemap.xml@ as the "slug". Set the layout to the one we just created and fill it with this content:
      
       
         
       
      
      h3. Step Three Like with the basic Sitemap page, the magic happens in the @xml_sitemapper@ snippet which needs to be created with the following content:
      
       
         
           
             http://yourdomain.com
             
             
               
                 
               
               weekly
             
           
           
         
       
      
      The @no-map@ page part has the same meaning of the simpler sitemapper snippet, while the @changefreq@ page part is used to override the default for the changefreq property (weekly). Don't forget to change the part http://yourdomain.com to match your domain name. In some cases the recursive nature of this recipe may produce a SQL error: "stack level too deep" as it does on my Dreamhost'ed Radiant site. See "MySQL SystemStackError: stack level too deep:":http://lists.radiantcms.org/pipermail/radiant/2007-September/006434.html for a discussion. I don't know a work-around for the Dreamhost case because I have no control over the DB server.

      Back to Page