<?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/"
	>

<channel>
	<title>Reinhold Weber &#187; drupal</title>
	<atom:link href="http://reinholdweber.com/category/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://reinholdweber.com</link>
	<description>Confessions of a web developer</description>
	<lastBuildDate>Thu, 03 Nov 2011 20:43:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The one thing you need to know about building CMS themes</title>
		<link>http://reinholdweber.com/2010/11/10/the-one-thing-you-need-to-know-about-building-cms-themes/</link>
		<comments>http://reinholdweber.com/2010/11/10/the-one-thing-you-need-to-know-about-building-cms-themes/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 19:58:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=52</guid>
		<description><![CDATA[Does it support intelligent body classes? It will make your theming life so much easier, it&#8217;s absolutely ridiculous &#8230; Read about the WordPress version and the benefits of using this concept for theming purposes here: http://codex.wordpress.org/Template_Tags/body_class WordPress (2.8+): &#60;body &#60;?php body_class&#40;&#41;; ?&#62;&#62; Drupal (originally from Zen Theme, since Drupal 6 in core): &#60;body class=&#34;&#60;?php print [...]]]></description>
			<content:encoded><![CDATA[<p>Does it support intelligent body classes?<br />
It will make your theming life so much easier, it&#8217;s absolutely ridiculous &#8230;</p>
<p>Read about the WordPress version and the benefits of using this concept for theming purposes here: <a href="http://codex.wordpress.org/Template_Tags/body_class">http://codex.wordpress.org/Template_Tags/body_class</a></p>
<p>WordPress (2.8+):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;body <span style="color: #000000; font-weight: bold;">&lt;?php</span> body_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;</pre></div></div>

<p>Drupal (originally from Zen Theme, since Drupal 6 in core):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;body class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$body_classes</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div>

<p>Joomla:</p>
<p>Not available by default, must be built manually in template. The Joomla 1.6 version of the default Milkyway template uses something remotely similar for color and background parameters and template width.</p>
<p>Magento:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;body <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBodyClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>?<span style="color: #0000ff;">'class=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBodyClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/11/10/the-one-thing-you-need-to-know-about-building-cms-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create your first simple Drupal 7 module</title>
		<link>http://reinholdweber.com/2010/06/28/create-your-first-simple-drupal-7-module/</link>
		<comments>http://reinholdweber.com/2010/06/28/create-your-first-simple-drupal-7-module/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 17:50:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=14</guid>
		<description><![CDATA[Create your first Drupal 7 module with the following steps. Create a folder called helloworld in sites/all/modules/custom Create a helloworld.info file Create a template file page-helloworld.tpl.php in your theme directory Enable your module at http://domain.com/admin/build/modules Visit http://domain.com/helloworld This belongs into your helloworld.info file ; $Id$ &#160; name = helloworld description = Reinholds Hello World module [...]]]></description>
			<content:encoded><![CDATA[<p>Create your first Drupal 7 module with the following steps.</p>
<ol>
<li>Create a folder called helloworld in sites/all/modules/custom</li>
<li>Create a helloworld.info file</li>
<li>Create a template file page-helloworld.tpl.php in your theme directory</li>
<li>Enable your module at http://domain.com/admin/build/modules</li>
<li>Visit http://domain.com/helloworld</li>
</ol>
<p>This belongs into your <em>helloworld.info</em> file</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">; $Id$</span>
&nbsp;
<span style="color: #000099;">name</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> helloworld</span>
<span style="color: #000099;">description</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Reinholds Hello World module</span>
<span style="color: #000099;">package</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Reinholds modules</span>
<span style="color: #000099;">core</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 7.x</span>
&nbsp;
files<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span> helloworld.module</pre></div></div>

<p>The <em>helloworld.module</em> file</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000000; font-weight: bold;">function</span> helloworld_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	  <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	  <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'helloworld'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	    <span style="color: #0000ff;">'title'</span>            <span style="color: #339933;">=&gt;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Hello world'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	    <span style="color: #0000ff;">'page callback'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'helloworld_output'</span><span style="color: #339933;">,</span>
	    <span style="color: #0000ff;">'access arguments'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'access content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$items</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/*
	* Display output
	*/</span>
	<span style="color: #000000; font-weight: bold;">function</span> helloworld_output<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/plain; charset=UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Disposition: inline'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'helloworld'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The theme template file <em>page-helloworld.tpl.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">print</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/06/28/create-your-first-simple-drupal-7-module/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Drupal 7 Themes &#8211; Browser specific CSS</title>
		<link>http://reinholdweber.com/2010/06/28/drupal-7-themes-browser-specific-css/</link>
		<comments>http://reinholdweber.com/2010/06/28/drupal-7-themes-browser-specific-css/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 17:08:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=10</guid>
		<description><![CDATA[In Drupal 6 you had to target IE specific CSS files by adding lines to your page.tpl.php or use an additional module which allows you to target browsers inside your theme.info file. In Drupal 7 however, the recommended way is by using the use drupal_add_css() function in your template.php file. function mytheme_preprocess_html&#40;&#38;$vars&#41; &#123; drupal_add_css&#40;path_to_theme&#40;&#41; . [...]]]></description>
			<content:encoded><![CDATA[<p>In Drupal 6 you had to target IE specific CSS files by adding lines to your page.tpl.php or use an <a href="http://drupal.org/project/conditional_styles">additional module</a> which allows you to target browsers inside your theme.info file.</p>
<p>In Drupal 7 however, the recommended way is by using the use <em>drupal_add_css()</em> function in your template.php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mytheme_preprocess_html<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$vars</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  drupal_add_css<span style="color: #009900;">&#40;</span>path_to_theme<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/fix-ie.css'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'weight'</span> <span style="color: #339933;">=&gt;</span> CSS_THEME<span style="color: #339933;">,</span> <span style="color: #0000ff;">'browsers'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IE'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'lt IE 7'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'!IE'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'preprocess'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/06/28/drupal-7-themes-browser-specific-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

