title: Show / Hide product tab using if statement in local.xml Magento 1.9 CE
body: <p>I'm fairly new to magento, using CE 1.9. </p>
  
  <p>I know how to remove / add tabs on the product page via local.xml
  However I'm trying to hide/show a tab based on the value of an attribute of the product.</p>
  
  <p>I have created a custom tab successfully. Additionally the customTab.phtml file I created I was able to get an if statement to work successfully... sort of...</p>
  
  <p>Here is my code inside the phtml file:</p>
  
  <pre><code>    &lt;?php
      $staticBlockId = 'block_product_tab2';
      $product = Mage::registry('current_product'); ?&gt;
  
  &lt;?php   if($product-&gt;getRepairservice()): ?&gt;
              &lt;div class="std"&gt;&lt;?php echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId($staticBlockId)-&gt;toHtml(); ?&gt;&lt;/div&gt;
  
  &lt;?php   endif; ?&gt;
  </code></pre>
  
  <p>This will successfully hide or show "content" of the tab based on the boolean value of the attribute. However it still is showing the tab, it's just empty.</p>
  
  <p>So I'm thinking I need to go to where it's created in local.xml but I'm not sure how to structure the if statement or get access to the attribute. Any help would be appreciated.</p>