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

Comparing version 3 and version 2

This page appears to duplicate the more recently edited [[How to Make Aa Site Map|How to Make Aa Site Map]] page.

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! 

Create a child of the homepage titled Sitemap and that somewhere in its Body part contains this:


Then create a snippet title sitemapper that contains this:


  
    
  • Then 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. Using a derivate of this technique you can also generate a sitemap.xml to submit to Google. First create a new layout with text/xml as Content-Type, and the following content:
    
    
    
      
    
    
    Then create a Google Sitemap page, with sitemap.xml as slug. Set the layout to the one we created earlier and fill it with this content:
    
    
      
    
    
    The actual magic happens in the xml_sitemapper snippet :
    
    
      
        
          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).

    Back to Page