Skip to content

Instantly share code, notes, and snippets.

@modmedia
Created January 18, 2014 22:17
Show Gist options
  • Save modmedia/8497539 to your computer and use it in GitHub Desktop.
Save modmedia/8497539 to your computer and use it in GitHub Desktop.
Disable robots per page in Mura
<!--- Add this to your config.xml.cfm --->
<!--- Extend Page/Default. You can also choose to extend Base/Default for all objects --->
<extension type="Page" subType="Default">
<attributeset name="Crawling" container="default">
<attribute
name="disableCrawling"
label="Disable Crawling"
hint="Prevent this page from being indexed by search engines"
type="RadioGroup"
required="false"
defaultValue="no"
optionList="yes^no"
optionLabelList="Yes^No" />
</attributeset>
</extension>
<!--- Add this to your html_head.cfm --->
<cfif yesNoFormat($.content('disableCrawling'))>
<meta name="robots" content="noindex, nofollow" />
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment