title: Magento shows attribute if value is null
body: <p>I have an attribute on my product view and list pages that displays a preview video on a separate page.  I'm pulling in the attribute using my themes product/view.phtml and product/list.phtml.  It has an image button that shows preview now.  The code is have is below.</p>
  
  <pre><code>&lt;a href="&lt;?php echo $this-&gt;htmlEscape($_product-&gt;getvideo_src()) ?&gt;" TARGET="_blank"&gt;&lt;img src="/graphics/preview-now.png" align="absmiddle" style="margin-top: 10px;" alt="Preview Now"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>The problem is that I don't want this image to display if the product attribute is null or blank.  I tried the code below in a few variations but that wouldn't work.</p>
  
  <pre><code>&lt; ?php if($_product-&gt;getvideo_src() != '') { ?&gt;
        &lt;span&gt;&lt;a href="&lt;?php echo $_product-&gt;getvideo_src(); ?&gt;" target="_blank"&gt;&lt;img src="/graphics/preview-now.png" align="absmiddle" style="margin-top: 10px;" alt="Preview Now"&gt;&lt;/a&gt;&lt;/span&gt;
  &lt; ?php  } ?&gt;
  </code></pre>