Google Sitemaps for Mura: the plugin
Update July 09/2009: thanks to Ben for finding the ".." error; all better now. Also, updated the config.xml to the use config.xml.cfm as well, as that seems to be the latest update for Mura plugins.
Update July 23/2009: a small update to make GSM more database-friendly (i.e. work with something other than just MySQL). Thanks to Andy for pointing this out.
Update Aug 19/2009: CreateODBCDateNow()?? No idea why that was used instead of CreateODBCDateTime( now() ) but people using ColdFusion 7 will be happier now. Thanks, James!
Google Sitemaps are the single best way for ensuring your website is being properly and fully indexed by Google. We've been playing with the Mura plugin architecture for quite a while now, and our first release is something that has already proven popular: automating Google Sitemap creation in Mura.
Installation
To install the Google Sitemaps (GSM) plugin you'll need a version of Sava/Mura that supports plugins. If you don't find the "Installed Plugins" page mentioned below, you'll have to do it the old fashioned way or update your Mura install.
To install the plugin:
- download the plugin (ctGoogleSitemaps.zip) file
(Note: you don't need to unzip the file; this is the format Mura Plugins come in). - login to Mura
- click on Site Settings (top-right on yellow bar)
- click on the Installed Plugins tab
- click on Browse and choose the ctGoogleSitemaps.zip file.
- click on Deploy
The plugin is now installed. The configuration page will let you choose default settings for the way the GSM plugin deals with individual pages & portals. The most important setting is the one at the bottom: make sure you check off every site you want to have a sitemap for.
Details
Sitemap.xml location
The actual sitemap.xml file is located in the root Mura web directory for each site. Remember that for your sitemap.xml file to serve any purpose, it must be registered. See Google's Webmaster/Site owner tools for details on how to do this.
Per-page Settings
You can configure the sitemap settings for a particular page or portal's Change Frequency and Priority under Site Manager » (page) » Extended Attributes » Google Site Maps. For more information regarding these settings, I recommend you visit Google's Sitemaps information page.
Inheritance
Inheritance and include/exclude settings are also found on the Extended Attributes page.
Depending upon how you configured your GSM plugin, all pages/portals are either included or excluded in your sitemap.xml file by default. If you chose to not include all pages and/or portals by default, then you have to include them manually. The reverse is also true if you chose to include all pages by default (in this case, you would have to manually exclude them). Inheritance can also be set, in which case the page will follow up the chain of "parent" pages until it finds an "include me" or "exclude me" setting.
Sitemap updates
Sitemaps are generated according to the settings you chose when installing/configuring the GSM plugin (Update Frequency).
For Daily/Weekly/Monthly updates, only loading this page will refresh the sitemap.xml file more frequently.
If you choose Every Update as your update frequency, the entire sitemap is regenerated every time you publish or delete a page or portal. This can be task intensive for large websites, so it is not recommended in those cases. Besides, you can force an update any time by clicking on one of the above buttons.
Adding sites
When you add a new site to Mura, you must update your GSM plugin to include it. The list of sites that the GSM plugin will be available to is found at the bottom of the plugin's configuration page.
Compatibility
The plugin we've created should be compatible for both earlier versions of Sava when plugins were first added, as well as the latest versions of Mura. While this isn't something we're going to do for future plugins, we had enough clients on the earlier version that justified a bit of extra work. This being said, we obviously haven't tested every version of Sava and Mura that's been released, so the safest bet is to update to the lastest version of Mura.
Download Google Sitemaps Plugin for Mura.
Comments
- Ronnie
You guys are pure GENIOUS... Thank you so much for this!
- July 14, 2009, 1:23 AM
- Jamie Krug
Nice job! I was thinking of leveraging my little SitemapCFC project (http://code.google.com/p/sitemapcfc/) to create a Mura plugin, but looks like you've got that one covered :)
At a glance through the code, noticed a couple curious points, but I've no experience w/Mura plugin dev yet, so it may make perfect sense :) There is both a config.xml and config.xml.cfm file, which look identical -- maybe just forgot to delete the old one from SVN? It also looks like some of the options (e.g., for changefreq, priority, etc.) show up in both the config.xml.cfm and hard-coded within a plugin.cfc method. Is one a default or something? I haven't traced through all the code, just seemed odd to notice the duplication.
Thanks for putting this out there, looking forward to giving it a whirl on a new Mura site.
- July 15, 2009, 8:55 AM
- Grant
@Jamie, we've got both config.xml and config.xml.cfm because the latest version of Mura indicated it needed the .cfm version, which up until that point wasn't used (only the .xml file). Both are there so that older versions of Mura & Sava will load the plugin. As to the plugin.cfc, it creates the actual Mura Class Extensions while config.xml is used to set the default values.
Let us know if you have any other questions!
- July 15, 2009, 3:13 PM
- Lou Lynch
I just installed this plugin and it was a breeze. I love the "per page" control at the editor level.
Nice job guys!
- July 16, 2009, 7:38 AM
- Steve Withington
@Grant, i've deployed the plugin to a recent version of Mura and while it appears to work for the "default" site, it's not creating a sitemap.xml file for any other site. have you seen this before?
- August 26, 2009, 3:53 PM
- Grant
@Steve, I haven't actually, and I've just checked a couple of Mura sites and they are working normally.
To be fair we almost always do one install/site so I wouldn't get exposed to that issue very often. It may be that you have to go through the setup process for the plugin again (not reinstall it, just click on the edit/pencil icon and resubmit it). Does the manual method work via the plugin information page?
I'll take a look at the code and see if I can discover what might be stalling this.
- August 28, 2009, 4:16 PM
- Hugo Ahlenius
Hi, I have some problems with my OpenBD installation - see my post at http://www.getmura.com/index.cfm/app-store/plugins/google-site-map-generator/
Thanks/cheers!
/Hugo
- October 23, 2009, 8:25 AM
- Michael Lapico
Great job on this plugin... had it running in a minute... with no issues.
Thanks for creating this plugin, saves me lots of time... and it works great.
- November 27, 2009, 7:57 AM
- Steve Withington
@Grant,
I know you normally do one install/site, but I have several installs with multiple sites. I'm running into some issues that I thought you might want to be made aware of.
For example, if I delete the plugin from Mura, you're only deleting class extensions relating to the current siteid instead of all references. Because of this, there are a number of orphaned records in a couple of db tables.
Would you want me to get under the hood and make some mods and forward those to you, or would you prefer to handle that yourself?
- February 9, 2010, 8:07 AM
- Ed
I am having the same problem as Steven. When I delete the plugin, I am still getting the Google Sitemap setting in my custom portal displays. What can I do to fix this?
- April 6, 2010, 4:28 AM
- Grant
It's a pretty old plugin, and Mura has changed *a lot* since this was written, so it may be that the 'remove' code doesn't work any more.
It uses class extensions, so all you have to do is go into that section of Mura and delete the classes it created.
We'll revisit it soon and make it 2.0.
- April 6, 2010, 9:07 AM
- Seb Duggan
I installed the plugin successfully on my first Mura site, and all is well.
But I've just created a new site, so I ticked its checkbox in the plugin settings, and the sitemap.xml is being created OK. But I'm not seeing the "Extended Attributes" tab in the page edit admin (I do see it for the original site, though).
- July 21, 2010, 8:48 AM
- Elizabeth
How can I get this plugin to work when I have siteidinurls=0 in the settings.ini.cfm file?
I can't seem to find the URL then to register on Google.
(I only have one site / Mura installation),.
- August 2, 2010, 2:11 AM
- Nicolas
The plugin is working very well (thanks!) when triggered manually, but it looks like the "Change Frequency" parameter is not effective: my sitemaps are not updated automatically... Am I missing something?
Great work, Grant!
- November 2, 2010, 10:49 AM
- Don Bellamy
While trying to install in the latest version of Mura (5.3.3381), received the following error:
form field [NewPlugin] doesn't exist or has no content
- December 6, 2010, 5:39 PM
- Richard Braxton
Will this generate a site map compatible with Google News?
- December 16, 2010, 10:46 AM
- Nicolas
Unfortunately no, but it would be a great addition to the plugin if it could deploy both formats.
@Grant: is that part of your plans?
- December 16, 2010, 11:58 AM
- Grant
The GSM plugin was created about 18 months ago now (back when we were all using something called (Sava), and hasn't really been touched since. I'll pass this over to the Meld side of things and see what can be done to bring it up to date.
- December 17, 2010, 9:46 AM
- Stephen Stick Hazen
Any chance of getting this updated for Mura 5.4?
- February 10, 2011, 3:01 AM
- Tim
I get an javascript error whenever I click "Update". Any ideas? It worked before I upgraded to latest files.
COLUMN 0
ID CF_CAST
LINE 622
RAW_TRACE at cfpluginManager2ecfc1938625718$funcUPDATESETTINGS.runFunction(C:\Inetpub\muraroot\requirements\mura\plugin\pluginManager.cfc:622)
TEMPLATE C:\Inetpub\muraroot\requirements\mura\plugin\pluginManager.cfc
TYPE CFML
- March 11, 2011, 11:31 AM
- Dan Rutledge
Hey... thanks for keeping this link up on the site. I actually tried the later version from Meld and that wasn't working, but this older version worked for my installation of Mura. Appreciate you sharing your hard work with everyone.
- June 21, 2011, 8:43 AM
- Roy Slater
I've seen a lot of different site map generators out there. Are some of them better than other ones? What should I look for in a site map generator? Do you have any other suggestion for plugins that you have used?
- October 14, 2011, 6:25 PM