WebsiteBaker Community Forum
WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Vlob on March 11, 2009, 04:05:20 PM
-
I want to use a different look for a site for each usergroep
is it possible to use the name of the usergroup as selector for the stylesheet...
something like
<link href="<?php echo TEMPLATE_DIR; ?>/[GROUP]/style.css" rel="stylesheet" type="text/css" />
in stead of
<link href="<?php echo TEMPLATE_DIR; ?>/style.css" rel="stylesheet" type="text/css" />
in which I make sure the needed css files are present
for instance
usergroups:
- group1
- group2
and in the templatefolder:
group1(folder)/style.css
+
group2(folder)/style.css
-
<?php
$thegroup = 'none';
if ($wb->is_authenticated()) { $thegroup = $wb->get_group_id(); }
echo '<link rel="stylesheet" type="text/css" href="'.TEMPLATE_DIR.'/group'.$thegroup.'.css" />';
?>
EDIT: Sorry, I forgot a bracket
-
thank you
just tested it and I get a blanc page.. any suggestions
<?php
$thegroup = 'none';
if ($wb->is_authenticated() { $thegroup = $wb->get_group_id(); }
echo '<link rel="stylesheet" type="text/css" href="'.TEMPLATE_DIR.'/group'.$thegroup.'.css" />';
?>
I created a testgroup called test and a test.css and put it in a folder 'group' in de template folder
-
Hello, you will need the GroupID (number) rather than the group name.
href="'.TEMPLATE_DIR.'/group'.$thegroup.'.css"
this means, that your css file is inside the template folder
and the name of your CSS File beginns with "group".
It should be something like group02.css
Hope this helps.
Regards,
Stefek