<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://zivtech.com" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
 <title>theming</title>
 <link>http://zivtech.com/terms/theming</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en</language>
<item>
 <title>Fun with Theme Switching</title>
 <link>http://zivtech.com/blog/fun-with-theme-switching</link>
 <description>&lt;p&gt;&lt;b&gt;UPDATE: CODE REWORKED THANKS TO CHX&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;/**&lt;br /&gt; * Implementation of hook_menu (D5 code)&lt;br /&gt; */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;SOMEMODULE_menu&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$may_cache&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp; if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$may_cache&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;theme&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$themes &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;list_themes&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (isset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$themes&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;])) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;custom_theme&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
With this you can amuse yourself by browsing to /node/1?theme=marvin&lt;/p&gt;
&lt;p&gt;I was thinking this could actually be useful- for example you could make an all xml theme and have Flash get data from path/to/page?theme=xml_theme&lt;/p&gt;
</description>
 <comments>http://zivtech.com/blog/fun-with-theme-switching#comments</comments>
 <category domain="http://zivtech.com/terms/drupal">Drupal</category>
 <category domain="http://zivtech.com/terms/theming">theming</category>
 <pubDate>Mon, 16 Jun 2008 20:40:20 -0500</pubDate>
 <dc:creator>Jody</dc:creator>
 <guid isPermaLink="false">1033 at http://zivtech.com</guid>
</item>
<item>
 <title>File-Based Content Templates</title>
 <link>http://zivtech.com/blog/file-based-content-templates</link>
 <description>&lt;p&gt;John Forsythe recently &lt;a href=&quot;http://blamcast.net/top-ten-drupal-modules-list&quot;&gt;posted&lt;/a&gt; that Contemplate is one of the most favorited modules on his &lt;a href=&quot;http://drupalmodules.com&quot;&gt;DrupalModules.com&lt;/a&gt; site, attributable to the learning curve of creating template files.&lt;/p&gt;
&lt;p&gt;With no offense to Jeff Robbins who created this very clever module, I&#039;ve never been a big fan of Contemplate.  I don&#039;t like it when people store code and markup in the database because it makes it impossible for me to find where their markup comes from when I search the files.    It also puts it out of the reach of version control, and creates the possibility of a white-screen situation which can only be fixed by going into the database directly.&lt;/p&gt;
&lt;p&gt;But contemplate fills a real void created by the difficulty in per-field theming in Drupal 5.  I &lt;a href=&quot;http://jodyhamilton.net/node-theming-field-deconstructing-node-content-drupal-5&quot;&gt;posted &lt;/a&gt; about my method of handling per-field theming in content types recently and have been refining that method since.  The purpose of my technique is to allow per-field custom theming without requiring additional work every time a new field is added.  Essentially you print out any fields you would like to custom theme, and then you loop through all the other fields and print them all out in the order and with the &#039;Display Fields&#039; settings as set in CCK.  Although this method requires additional setup up front, it pays off when you add new fields (or modules that add new node content of their own) and you don&#039;t have to readjust your template (or contemplate).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://zivtech.com/blog/file-based-content-templates&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://zivtech.com/blog/file-based-content-templates#comments</comments>
 <category domain="http://zivtech.com/terms/drupal">Drupal</category>
 <category domain="http://zivtech.com/terms/theming">theming</category>
 <pubDate>Thu, 10 Apr 2008 15:38:44 -0500</pubDate>
 <dc:creator>Jody</dc:creator>
 <guid isPermaLink="false">768 at http://zivtech.com</guid>
</item>
</channel>
</rss>
