title: Magento product view template based on category
body: <p>We are working on a Magento webshop which has two categories.</p>
  
  <p>We would like to use the default product view template for category one, and a custom product view template for category two.</p>
  
  <p>Is this possible and how we can achieve this?</p>
  
  <p><strong>* EDIT - SOLUTION *</strong></p>
  
  <p>For anyone who is curious about this. The solution was a lot easier than I thought.</p>
  
  <p>I only had to place this piece of code in the custom layout update section of the relevant category and i had to set the option 'Apply to products' to yes!</p>
  
  <pre><code>&lt;reference name="product.info"&gt;
      &lt;action method="setTemplate"&gt; &lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt;
  &lt;/reference&gt; 
  </code></pre>
  
  <p><strong>* EDIT *</strong>
  I have tried adding this code to the catalog.xml.</p>
  
  <pre><code>&lt;CATEGORY_5&gt;
      &lt;reference name="product.info"&gt;
          &lt;action method="setTemplate"&gt;&lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt;
      &lt;/reference&gt;
  &lt;/CATEGORY_5&gt;
  </code></pre>
  
  <p><strong>* EDIT *</strong>
  I have tried adding this code to the catalog.xml:</p>
  
  <pre><code>&lt;CATEGORY_5&gt;
      &lt;reference name="product.info"&gt;
          &lt;action method="setTemplate"&gt;&lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt;
      &lt;/reference&gt;
  &lt;/CATEGORY_5&gt;
  </code></pre>
  
  <p>And this code to the Custom Layout Update section:</p>
  
  <pre><code>    &lt;reference name="product.info"&gt;
          &lt;action method="setTemplate"&gt;&lt;template&gt;catalog/product/view-recipe.phtml&lt;/template&gt;&lt;/action&gt;
      &lt;/reference&gt;
  </code></pre>
  
  <p>I installed the patch but unfortunately still no results.</p>