Did you check the access permissions for the underlying node type (the one being referenced) to ensure that Anonymous users have view permissions?<br><br><div class="gmail_quote">On Thu, May 14, 2009 at 11:34 AM, Scott <span dir="ltr"><<a href="mailto:scott@bscottholmes.com">scott@bscottholmes.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I have created a CCK content type that contains a field defined as a<br>
node reference. The value in this field is available to logged in users<br>
but not to anonymous users. I'm defining a variable thus:<br>
<br>
$coupon = $node->field_coupon[0][view];<br>
<br>
then later testing for a value, thus:<br>
<br>
<?php if ($coupon): ?><br>
<div id="coupon" class="field field-type-nodereference<br>
field-field-coupon"><br>
<?php print "Print ". $node->field_coupon[0][view] . " for " .<br>
$node->field_coupon_terms[0][value]; ?></div><br>
<?php endif; ?><br>
<br>
$coupon has a value for logged in users but not for anonymous users. I<br>
do have the nid value available ($node->field_coupon[0][nid]) so it is<br>
possible to select the referred to node by selecting from the database<br>
but I'd rather not if I don't have to.<br>
<br>
Thanks, Scott<br>
<font color="#888888"><br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br>