views:

31

answers:

3

I'm using content access module to restrict certain nodes and node types for un-registered users.

But I would like to create a view where unregistered users can also see titles of those restricted nodes.

How can I do this ?

A: 

If you want to restrict access to some fields and not to others, you really should be using permissions per field. I assume all fields are built with CCK, so just enable permission for the content-type, but disable for all fields.

That way, only the title is visible. I don't think you can disable permissions for the standard body field, but I always use a CCK text-area for that anyway, it's alot easier also for css since the standard body field isn't wrapped in default node printing.

Rakward
no, this is not possible, because there are 6 roles for the same content type and each node has been assigned access rules using the module above for the same content type.I just want to show anonymous user the titles of restricted nodes as teaser.
Nikhil
+1  A: 

I haven't used this personally, but I just saw it pop up in the drupal.org module feed a few days ago, and it should help: http://drupal.org/project/views_ignore_node_permissions

peterjmag
I hope this works, will let you know, after I have tried.
Nikhil
This module works. But for now set "Items to Display" to anything other than 0. It doesn't work with 0.
Nikhil
A: 

You can write a simple module for this, which does the following:

  • query the node titles you want to show (called by hook_menu)
  • theme the result (hook_theme)
  • display the result (hook_block)

in the *hook_perm* you can create a new permission who you would like to show the node titles, if it is for everybody, just use 'access content'.

Dr. Hfuhruhurr

related questions