Hi all,
I am trying to list some documents and give acces to some of them only for a certaing group of users.
I want to be able to display all documents but unregistered users should be redirected to login/register when will try to access private documents.
I am using FileDetails and Ditto for listing of the documents. Up to know I have managed to show/hide documents based on privileges.
Not sure hot to do the above scenario.
Many thanks in advance.
-
☆ A M B ☆
- 275 Posts
Hi
you need to install a page with WebLogin call
When user passes that page with successfull credentials you can let modx redirect registered user to a page of hidden content
PM me if you need a demo on my test server, cheers
modx and ecommerce pro
-
☆ A M B ☆
- 24,524 Posts
Hiding pages from non-validated users is one thing; having all pages displayed in a menu to all users while the protected pages themselves are still not accessible is something else.
Ditto has the &hidePrivate parameter that will list private pages if set to 0. The private pages themselves will still redirect to your site’s Unauthorized page. So you could use Ditto for generating the list of pages and their links, some of which are private. Clicking on one of the private page’s links will get the Unauthorized page, which you can have with some content and login/registration forms.