Different templates for different users

A place for users and developers of the Xataface to discuss and receive support.

Different templates for different users

Postby iliakros » Wed Feb 03, 2010 3:08 am

Hello,

I would like to give the 'edit record' page a different look for the users
For example:
The admin keeps the original look
The users get a new look (new main template)

How can I accomplish this

Thanks
iliakros
 
Posts: 13
Joined: Mon Jan 04, 2010 8:14 am

Re: Different templates for different users

Postby iliakros » Wed Feb 03, 2010 4:38 am

I found the answer
I am using

Code: Select all
{if $ENV.role == 'admin'}
template
{/if}
{if $ENV.role != 'admin'}
template
{if}

In Dataface_Record_Template.html

You can also check on other criteria like username or whatever is in your user table

Iliakros
iliakros
 
Posts: 13
Joined: Mon Jan 04, 2010 8:14 am

Re: Different templates for different users

Postby shannah » Thu Feb 04, 2010 12:13 pm

Note that using themes it is also possible to give different users different themes enirely.. I'll see about posting a tutorial on this soon.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved