Stats
Version
1.0.1
Wheels Compatibility
1.0.3, 1.0.2, 1.0.1, 1.0
Downloads
51
Last Updated
April 17, 2010
About Plugins
Plugins allow you to extend or modify default Wheels application behavior. To use, you just drop the zip file into your plugins directory and reload your application.
Read Using and Creating Plugins for more information.
Block Robots
Use the blockRobots() function to automatically block search engine spiders from crawling your non-production environments.
Author
Project Home
http://github.com/clearcrystalmedia/Block-Robots
Description
The blockRobots() function does 2 things for you to keep search engine spiders out of your dev environments and other pages of your choosing.
- If your Wheels environment is not set to
production, it will return a meta "robots nofollow" tag instructing search engines to ignore your application. - If you pass a value of
trueto theblockIndexingorblockFollowingarguments, it will return a meta "robots nofollow" tag to your specifications.
Usage/Examples
The most common use is to just add a call to the end of your tag block in views/layout.cfm:
<!DOCTYPE html>
<html>
<head>
<title>#pageTitle#</title>
#blockRobots()#
</head>
...
You can also create parameters that you pass on to your view in order to selectively block indexing or following activities by search spiders, even when the site is in production.
<cfsetting enablecfoutputonly="true">
<cfparam name="pageTitle" type="string">
<cfparam name="blockIndexing" type="boolean" default="false">
<cfparam name="blockFollowing" type="boolean" default="false">
<cfoutput>
<!DOCTYPE html>
<html>
<head>
<title>#pageTitle#</title>
#blockRobots(blockIndexing=blockIndexing, blockFollowing=blockFollowing)#
</head>
...
Change Log
Version 1.0—March 11, 2010 Download
- Initial release.
- Wheels compatibility: 1.0, 1.0.1, 1.0.2.
