Adding Meta Data to an Entire Site in Mura

February 01, 2012

This is mostly for my own reference...isn't that how most blog posts start these days? :) As some of you know, when I'm not busy with consulting, I play music in a variety of projects. Earlier I needed to update the meta "keywords" and "description" for my band's website (currently running Mura 5.5) -- the meta data is the same for every page across the site, so I was looking for one site-wide place where I can make such a change. My first thought was "there's probably a site-wide setting for that in the Mura Admin", but after poking around for a few minutes, that didn't seem to be the case. I suppose it's possible that the meta data is hard-coded into the site theme (though unlikely), so let's check there. Mura has a site-specific directory where it stores the themes, like so: /[sitename]/includes/themes/[theme name] ...and underneath there, you'll find a variety of files composing that theme (css, images, some CF templates for headers/footers, etc). Among these is html_head.cfm which contains all the things you'd typically find in the section of a website, and in there we find: <meta name="description" content="#HTMLEditFormat($.getMetaDesc())#" />
<meta name="keywords" content="#HTMLEditFormat($.getMetaKeywords())#" /> ....Okay, so the meta data isn't hard-coded, and there isn't a site-wide setting for it either. After a bit more searching, I found this link discussing "converting a third-party theme to a Mura theme" (not the most obvious of places for info about meta data, but hey it contains the answers I needed). About halfway down the page is this blurb:
Notes: Unless you specify otherwise on a specific page, Meta data content cascades down to the content nodes below. This means you don't have to set the meta data content on every page unless you specifically want to.
So let's to back to Mura Site Manager...my site content is laid out like so: Mura Site Manger screenshot As you can see, everything is below "Home", so let's click on "Home", then go to "Meta Data" and add the new keywords and description. Success! So although the answer I needed was listed as part of "converting third-party themes", the answer applies to pretty much any theme in Mura, regardless of where it came from. As long as the theme html_head.cfm file includes these lines: <meta name="description" content="#HTMLEditFormat($.getMetaDesc())#" />
<meta name="keywords" content="#HTMLEditFormat($.getMetaKeywords())#" />...this should work just fine.

-Nolan