targutaja.info
Jump to navigation
17 November 05
Google Sitemaps and Nucleus CMS
Yesterday when
Google announced that its Sitemaps project is now spitting out some nice stats about the sites it tracks, I once more set out to generate the Google sitemap automatically with
Nucleus CMS.
Last time I tried I ran into some difficulties of broken download links and Japanese installing instructions. But this is not rocket science I thought and did some searches on Google for "
google sitemaps nucleus". As you can see the results are not exactly non-japanese-speaking-friendly. But how hard can it be? I opened
this page, downloaded the skin files and tried to figure out what the the instructions are saying. After that it took me some fiddling around and voila the sitemap generator works
like a charm.
Here are the steps to get your very own Google Sitemap for Nucleus CMS:
- Download and extract the files from the sitemap.zip.
- Upload sitemap.php to your Nucleus installation root, so it its in the same place as the config.php file.
- Upload sitemap directory from sitemap.zip to skins/.
- Go to Nucleus admin and choose Skins.
- Create a new skin called "google/sitemap" (without quotes and the description is irrelevant).
- Click edit on your newly created "google/sitemap" skin.
- In skin parts select "Main Index" and paste the following code into the textarea:
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
<url>
<loc><%sitevar(url)%></loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<%blog(google/sitemap,9999)%>
</urlset>
Update Skin - Choose Templates and create a new template called "google/sitemap" (without quotes and the description is irrelevant).
- Click edit on your newly created "google/sitemap" template.
- Now click "empty field (click to edit)" of the "Item Body" field and paste the following code into the textarea:
<url>
<loc>your-way-cool-site.com<%itemlink%></loc>
<lastmod><%date(utc)%></lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
Update Template. - Now point your browser at http://your-way-cool-site.com/sitemap.php and you should get a nice XML file with all your individual posts in it. All you have to do now is to submit your sitemap to Google. Submit tha php file so it will be live, you do not have to make an static sitemap.xml. You can add categories and archives to your Google sitemap but I am happy with the item list for now.
Note: as you can see in the skin code (<%blog(google/sitemap,9999)%>) you can only get a sitemap for 9999 posts. I don't know if it is a limit set by Nucleus or what. That's how it was in the original files from our
Japanese friends. But 9999 post should keep you busy for some time.
Träkkbäkk
Sellele postitusele pole ühtki träkkbäkki.
Kasuta seda
Träkkbäkki pingimiseks (parem-klikk, copy link target).Käsitsi träkkbäkki lisamiseks kasuta
seda vormi.
Kommentaarid
Lisa kommentaar
Comments must be approved before being published.