<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Raised By Turtles&#187; taxonomy</title>
	<atom:link href="http://raisedbyturtles.org/tag/taxonomy/feed/" rel="self" type="application/rss+xml" />
	<link>http://raisedbyturtles.org</link>
	<description>None of the News that's Fit to Print</description>
	<lastBuildDate>Sat, 04 Feb 2012 01:10:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding robots meta tags to Drupal nodes having a given taxonomy term</title>
		<link>http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/</link>
		<comments>http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 00:56:43 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[taxonomy]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=554</guid>
		<description><![CDATA[There is no Drupal 6 module that lets you add a meta noindex to pages tagged with a specific term, but here's how to do it easily in the theme layer. ]]></description>
			<content:encoded><![CDATA[<p>Well, the title is a mouthful, but here&#8217;s the situation. You have some nodes that are classified with a certain taxonomy term and you want to tell Google not to index those pages, how do you do it? There is the excellent <a href="http://drupal.org/project/nodewords">nodewords</a> module that lets you manage all kinds of meta tags, including most use cases for the robots meta tag. You can assign meta robots for the taxonomy listing pages, but not for nodes that are tagged with a certain term. For that, you need a little scripting.</p>
<p>Fortunately, Drupal provides you with <a href="http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/function/taxonomy_node_get_terms_by_vocabulary/6">taxonomy_node_get_terms_by_vocabulary()</a>. In Drupal 6, this takes the $node object and a vocabulary ID. Then you just have to cycle through the terms it returns and see if your term is in there. </p>
<p>In my case, I have some pages that need to be publicly accessible, but must not be in Google or other indexes. So I let those get tagged with a special taxonomy term (&#8220;custom&#8221; in my case, but it could be &#8220;noindex&#8221; or anything). All you need to know is the vocabulary ID and the term ID for the term you&#8217;re testing for and you can apply the meta noindex to any node. Sometimes node_load() carries a high cost, but since we&#8217;re only testing this on nodes and we&#8217;re testing for the node in question, that data should be cached and should not result in another database query.</p>
<pre class="brush: php; title: ; notranslate">
function MYTHEME_preprocess_page(&amp;$vars, $hook) {

// if this is a node and not being edited and it is tagged with term 41, then add a &quot;noindex&quot; tag
   if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1)) &amp;&amp; is_null(arg(2))) {
	    $node = node_load(arg(1));
	    $terms = taxonomy_node_get_terms_by_vocabulary($node, 2);

		foreach($terms as $term) {
		  if ($term-&gt;tid == '41') {
			$vars['head'] = drupal_set_html_head('&lt;meta name=&quot;robots&quot; content=&quot;noindex&quot; /&gt;');
		    break;
		  }
		}
	}
}
</pre>
<p>In order to get the meta tag to show, you&#8217;ll need to clear your caches.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/robots-meta-drupal-nodes-by-taxonomy-term/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Seeing All Child Nodes in Drupal Taxonomy</title>
		<link>http://raisedbyturtles.org/drupal-drilldown/</link>
		<comments>http://raisedbyturtles.org/drupal-drilldown/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 04:04:46 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[taxonomy]]></category>

		<guid isPermaLink="false">http://raisedbyturtles.org/?p=305</guid>
		<description><![CDATA[I have been tearing my hair out a bit trying to figure out how to save a whole taxonomy lineage in Drupal, so that everything tagged with a child term would be tagged with a parent term. In other words, given a taxonomy like: 1. United States 3. California 4. Vermont 2. Canada 5. Alberta [...]]]></description>
			<content:encoded><![CDATA[<p>I have been tearing my hair out a bit trying to figure out how to save a whole taxonomy lineage in Drupal, so that everything tagged with a child term would be tagged with a parent term. In other words, given a taxonomy like:</p>
<ul>
<li>1. United States
<ul>
<li>3. California</li>
<li>4. Vermont</li>
</ul>
</li>
<li>2. Canada
<ul>
<li>5. Alberta</li>
</ul>
</li>
</ul>
<p>I want it so that if I tag something as <em>California</em> (term 3), it also gets tagged as <em>United States</em> (term 1). The <a href="http://drupal.org/project/hierarchical_select">Hierarchical Select module</a> does this, and much more, but it has conflicts with other Drupal modules I want to use, so I just gave up on it. </p>
<p>Finally, I realized that I could simply turn it around and solve this on the data retrieval end, rather than the data storage end. In Drupal, if you enter a standard Drupal path like <em>/taxonomy/term/1</em>, that shows only nodes tagged as <em>United States</em>, but <em>/taxonomy/term/1/all</em> shows all nodes tagged <em>United States</em> <strong>and </strong>all nodes tagged with child terms.</p>
<p>I&#8217;m trying to build a drill-down <a href="http://ultraskier.com/directory">directory of professional ski instructors</a> (emphasis on <em>trying </em>— it&#8217;s still pretty rudimentary now and doesn&#8217;t yet have any instructors really). I realized that I could use the <a href="http://drupal.org/project/taxonomyblocks">Advanced Taxonomy Blocks module</a> to navigate for the drill down and was looking to create an add-on module or a patch for the module so that I could have it add the &#8220;all&#8221; to the end of the URL. Then I saw this in the settings:<br />
<img src="http://raisedbyturtles.org/wp-content/uploads/AdvancedTaxonomyBlockPathSettings.jpg" alt="Advanced Taxonomy Block Path Settings" title="Advanced Taxonomy Block Path Settings" width="381" height="85" class="aligncenter size-full wp-image-306" /><br />
All you have to do is add the <em>/all</em> to the end of the path. It&#8217;s built right in to the module settings (go to <em>/admin/settings/taxonomyblocks</em> and click <em>Configure</em>).</p>
<p>So much thanks to <a href="http://www.pixelclever.com/">Aaron Hawkins, an awesome drupal developer</a>, for this simple way around my problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://raisedbyturtles.org/drupal-drilldown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

