Forums / Setup & design / Differing Pagelayouts for different users
James Packham
Thursday 02 October 2003 4:14:07 am
Hi
I want different users to have different "views" of my site. To do this I've started with a fairly simple example, using the news template site as a basis.
I have two versions of pagelayout.tpl, the original and a modified version where the menu items "login" and "register" appear on the left menu. I want anonymous users to see the modified template and logged in users to see the original. Here they are displayed in the news_admin interface:
Template Design Resource /pagelayout.tpl design/news/templates/anonpagelayout.tpl design/news/override/templates
I also have an entry in settings/siteaccess/override.ini.append that reads:
[anon_user_view] Source=/pagelayout.tpl MatchFile=/anonpagelayout.tpl Subdir=templatesMatch[class]=10
(with 10 being the class of the anonymous user)
It doesn't seem to be working, have I gone about it the right way? I don't mind if no one can help me fix it, I just wanted to know if I'm doing this the wrong way...
~James~
Sandra Parente
Thursday 02 October 2003 6:31:13 am
You must specify the section, too:
Match[section]=4Match[class]=10
So, before you have to assign to your content a different section for every different template.
It works for me.
Sandra Parente www.netbliss.it
Friday 03 October 2003 2:27:15 am
First of all thank you for your help! :) I wasn't sure if anyone was going to get back to me, so was very thankful and relieved to see that you had!
Second, I was reading a documentation about this after I read your post that was very helpful in taking me further, but I came in this morning and I can't remember what it was called (*doh!*)! Could you, or anyone else reading this help me out with finding it?
Cheers!