[support] Hide/Show node according to cck value

Vaibhav Jain in.vaibhavjain at gmail.com
Sat Aug 31 07:03:02 UTC 2013


even in that case too, you can show hide which nodes to show and which not,
by altering the search results you get.
Hooks are available for solr as well as default search too.


On Sat, Aug 31, 2013 at 12:04 PM, Mutuku Ndeti <jnmutuku at gmail.com> wrote:

> Thanks Vaibhav,
>
> I am also looking for a way to hide the nodes from search results.
>
>
> On 31 August 2013 09:25, Vaibhav Jain <in.vaibhavjain at gmail.com> wrote:
>
>> 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
>>
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
>
>
>
> --
> Tel:254- 722-490994
> www.agile.co.ke | www.jipambe.com
>
>
> --
> [ 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/f5efe88c/attachment.html 


More information about the support mailing list