Hi,
I am creating more than two user type. i have to create two user type for one user type i want to use one layout for another i want to use another layout. how can i do this?

Thnaks

Comments

nevets’s picture

How are you differentiating the two user types, two content types, a profile field or something else?

aakanksha’s picture

I mean, like there are anonymous user and authenticated use.
Authenticated user will be of 2 type. basically i want to prepare two page.tpl.php file for these 2 type of users.

sumitshekhawat7331’s picture

for this you can use its not the perfect way but you can achieve what you want...
just use a simple if else condition for this like

<?php
global $user;
if ($user->uid) 
{
  echo('Template One Code which is for authenticated Users');
}
if (!$user->uid) 
{
echo('Template Two for anonymous users');
}
?> 

or these are some modules

http://drupal.org/project/taxonomy_theme
http://drupal.org/project/viewtheme

aakanksha’s picture

Thanks sumit for ur reply,

prividing userid is not possible bcoz there will be thousands of users. actually, here i want to use two databases, if user is in one database then one layout should appear if he is in 2nd database then different layout should appear.

is it possible???
Thanks

sumitshekhawat7331’s picture

No no....
user id is generated automatically ....
this variable will be used to check... whether any user is online or not(means logged in or not)
there is no need of two databases.... make a very small demo site using this code and check ..its working or not...

aakanksha’s picture

sorry, by using userid, i mean user login id,
actually there will be two type of user:
1. comes from different database
2. comes from different database.

actually i want to integrate one more database with it. i want if it is in one database also than i want to provide some additional functionality.