Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Different detailed pages depending on user?

Quote Reply
Different detailed pages depending on user?
Hello,

I tried searching on the archives but didn't found any guidance on this :(

I want to give users different access levels (guest, silver, gold), so that when viewing detailed pages of the database, guest user can see 3 fields of info, silver user 7 fields, and gold user 8 fields, for example. Guest is the 'default' user, and Silver and Gold should need to log in.
No 'editing priviledges' for any of those levels.

Any suggestion on how to do this? Or if it's been discussed, could you point me to that thread?

If possible, I'd like the detailed pages to be static instead of dynamic.

Thanks,

Emilio
Quote Reply
Re: [ekaram] Different detailed pages depending on user? In reply to
Create a new hidden "Level" INT column in your users table with values corresponding to the levels of access you want. For example: 1=guest, 2=silver, 3=gold. Set 1 as the default, and change the Level of silver users to 2 and of gold users to 3. Then, in the detailed.html template, put tags like

<%if Level >1%>silver&gold info<%endif%>
<%if Level >2%>gold info<%endif%>

around the fields you only want gold or silver users to see.
_________________________
bruce@gossamer-threads.com
Quote Reply
Re: [Inertia] Different detailed pages depending on user? In reply to
Thanks. But will this work even if the pages are pre-built (not dynamic) ?
Quote Reply
Re: [ekaram] Different detailed pages depending on user? In reply to
It should work when your pages get built.

If you update any of the links, you'll have to re-build the pages again for those to be reflected in the detailed pages - if they're static as apposed to dynamic which would reflect the changes immediately.

r.

Last edited by:

ryel01: Sep 30, 2002, 11:43 PM
Quote Reply
Re: [ekaram] Different detailed pages depending on user? In reply to
This will not work in static mode (everybody sees the same in static mode).

If you want to implement a permission system in static mode, you would need to give out passwords for certain directories, and in these directories, you would place the content that is private.

Ivan
-----
Iyengar Yoga Resources / GT Plugins