<span class="Apple-style-span" style="border-collapse: collapse; "><span style="border-collapse: collapse; ">sebastian,</span><div><span style="border-collapse: collapse; "><br></span></div><div><span style="border-collapse: collapse; ">Actually don&#39;t need to touch view or view template. The more &#39;natural&#39; way is to check it under phptemplate_preprocess_node, if the field&#39;s content does not exist, add an additional CSS class to the node (says &#39;no-field-A&#39;). This way you theme the node + the view or other ways that you retrieve a node.</span><br>

</div><div><span style="border-collapse: collapse; "><br></span></div><div><span style="border-collapse: collapse; ">In your CSS, just theme</span></div><div><span style="border-collapse: collapse; ">.no-field-A .field-A {</span></div>

<div><span style="border-collapse: collapse; ">  display: none;</span></div><div><span style="border-collapse: collapse; ">}</span></div><div><span style="border-collapse: collapse; "><br></span></div><div><br></div></span>Cheers,<br>

CK Ng<br><br>forDrupal Premium Themes (<a href="http://fordrupal.com" target="_blank">http://fordrupal.com</a>)<br>- we make drupal beautiful<br>
<br><br><div class="gmail_quote">On Fri, Apr 10, 2009 at 2:19 AM,  <span dir="ltr">&lt;<a href="mailto:themes-request@drupal.org" target="_blank">themes-request@drupal.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
<br>
Message: 1<br>
Date: Wed, 08 Apr 2009 17:56:46 -0700<br>
From: sebastian &lt;<a href="mailto:inforazor@gmail.com" target="_blank">inforazor@gmail.com</a>&gt;<br>
Subject: [themes] how to stop a &#39;view&#39; from showing a field?<br>
To: <a href="mailto:themes@drupal.org" target="_blank">themes@drupal.org</a><br>
Message-ID: &lt;<a href="mailto:49DD47CE.9070008@gmail.com" target="_blank">49DD47CE.9070008@gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Hello listers,<br>
<br>
Hope this is the right place to ask this question.<br>
<br>
I am building a theme and I have little icons that I want to have<br>
appearing when there is a &#39;File - CCK&#39; field present.<br>
<br>
The field is optional in the content-type. I have created a view for the<br>
page that shows the content, and when the file-cck field is empty, it<br>
still shows all the surrounding &lt;div&gt; and &lt;a href&gt; tags, which triggers<br>
my CSS and then I still show the little custom PDF icon; only I want it<br>
to be blank.<br>
<br>
When I click on the View for the field: file-cck (generic files)<br>
<br>
I only see the options:<br>
<br>
- Exclude from display<br>
- Rewrite output field<br>
- Output this field as a link<br>
- Trim to max length<br>
- Link this to its node<br>
- Label [none/drop down]<br>
- Format [generic files]<br>
<br>
I can&#39;t see from this list any way to have it be conditional; ie: only<br>
display Field formatting [Div+a href] if there is actually any data present.<br>
<br>
Thanks for your help, hopefully this is an easy one.<br>
:)<br>
<br>
Kind,<br>
<br></blockquote></div><br>