Hi,

I create some views for my nodes and enabled pagination.

What I'm trying to do is to 'disable' pagination (page/2, next, last, ...) for anonymous users.
Registered Users should of course see all content. There are roles for both user types but I don't know how to hook this to the pagination buttons.

A possible solution I thought of would be to duplicate the view, one for anonymous users with no pagination (say node limit to 10) and a copy of that page with pagination (and a node limit of 10 per page). The downside of this solution is that the path names would be different of course. Also, If I change something to one view I have to copy the changes over to the second view...

Just wanted to know if I'm on the right track or if there is a simpler solution for this.

Thank you!

Comments

cayenne’s picture

Make a panel with two panes. One (paginated) visible to logged-ins, and one (not) visible to non-logins.

Poof! One url

:)

carmatic’s picture

Works perfectly! Thanks Cayenne!

cayenne’s picture

Great! Congrats

:)

Elteto’s picture

Even though they cannot see the page links, users can probably just add the page number to the URL, or directly link to previous articles/content with a node number in the URL. Not only users are smart enough to do that, there are even automated browser plug-in utilities out there to do this for them. It would probably work better if you assigned content level permissions, and either manually or automatically set older content to not be accessible by non-registered users.

carmatic’s picture

I see, you mean that I should assign the allowed user role to the node itself. Makes sense - so Drupal is managing what is permitted and what not. It is indeed true that users will try to access other content, or even search engine crawlers. If the node has been listed on the first page sometime earlier, google will try to recrawl it (successfully) at a later date. Right - I try to fix this by assigning the correct roles. Great idea, too!