[development] Field name in view template woes
Jeff Greenberg
jeff at ayendesigns.com
Thu Dec 31 23:48:58 UTC 2009
On 12/31/2009 11:34 AM, Earl Miles wrote:
>
>> In fact, the image field can be multiple, and is set in the view to
>> show 1 image. I added a dump of $view->fields, and it's empty. So if
>> I include the image for display, it shows when I print $content, even
>> though I've created $content without explicitly including it in the
>> statement.
>
>
> Sorry, I typo'd. $view->field[...]
>
>
Thanks, Earl ... what a difference an 's' makes! I found that in the
field, there is a [last_rendered] which has the image.
So, for my next clueless act, here is the follow-on to this, which is
even more confusing to me.
This is a grid display. Only one of the nodes on the first page actually
-has- an image, and it is the final cell. If I create
views-view-field--product-catalog--page--field-image-cache-fid.tpl.php
and in it, display the nid, I only get the display once, for the node
with the image, not for any of the other cells. I infer from this that
the template isn't used if there is no image, which makes sense.
However, on the page, the cells for which there is no image end up
displaying the alt text.
What would the template file name need to be so that if I displayed the
nid it would display it for all those other cells - the template in
which I can set $output to '' to -not- print the alt text?
More information about the development
mailing list