What I want to do seems pretty straightforward, but I don't see how to do it.

I am using Content Access to restrict access to one content type to authenticated users. That works great.

I am using Views to show titles of that content, sorted by topic. That works great as well, IF the user is logged in. But if the user is anonymous, all they see is the title of the view, without the list of titles.

How would I go about configuring things so that the titles (and possibly teasers) of the restricted content are shown to anonymous users in these views?

Comments

maedi’s picture

Did you have any luck with this?

micheleannj’s picture

I've looked at:

*Content Access
*Premium
*Simple Access
*Node Access Control
*Restricted

None of them seem to offer this option!
Please post back if you find a solution...

masood_mj’s picture

subscribing

piebuo’s picture

same problem..any suggest?

maedi’s picture

One option is to do something along the lines of this in your node.tpl.php

  <?php if($teaser): ?>
    <h3>
      <?php if($user->uid == 0) :  ?> 
        <?php print $node->title ?>
      <?php else: ?>
        <a href="<?php print $node->path ?>"><?php print $node->title ?></a>
      <?php endif; ?>
    </h3>

  <?php else: ?>
    <?php print $content ?> 
  <?php endif; ?>

And then in the view change row style to 'Node'.

This method doesn't even require a 'Content Access' type module. Of course the content is still accessible by anyone if they know the URL.

llkks’s picture

Some of you might still be interested:
I had the same problem, and found a rather simple way to avoid the problem. Instead of restricting the access to the node, I created a CCK field that replaced the original text field and restricted the access to the text on a field basis. Thus, the title is still accessible for views.

mcwgb’s picture

Worked a treat!

I'd been wrestling with Simple Access / Restricted Content / et al. to try to show a list of restricted content to non-authorised users. This way actually works out better - I can split up the page content into CCK fields (about author, overview, main article, conclusion) and give non-authorised users a sampler of the restricted content (overview).

Many thanks for the help!