[support] Hide/Show node according to cck value

Vaibhav Jain in.vaibhavjain at gmail.com
Sat Aug 31 06:25:25 UTC 2013


You can do that from the "Publish" checkbox provided in core, and allowing
registered users to see the unpublished nodes.

However, with CCK, you can add a check in node view or if possible init (if
we get the complete node object there), and check if the what the value is
set to.
If anonymous cannot see the node, add drupal_access_denied(); and exit;
This should do. :)


On Sat, Aug 31, 2013 at 11:44 AM, Mutuku Ndeti <jnmutuku at gmail.com> wrote:

> Hi,
>
> I have a cck field where a user or admin can select "do not display this
> item(node)". I need to hide the node with this specific value to anonymous
> users.
>
> what would be the best approach to do this.
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Regards,
Vaibhav Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130831/3f8505db/attachment.html 


More information about the support mailing list