G'Day,

- I am new to Drupal but not to LAMP
- I want to know how I:

1) Use a different site template (incl. CSS) for a) Administration b) Authenticated Users c) Non authenticated users
2) How to associate a template with a particular node

TIA

Comments

budda’s picture

Check the handbook tab for phptemplate stuff.

--
Drupal consultancy

jimmny.c’s picture

murph’s picture

Sorry to jump in here, but thought it better than starting a new thread on the exact same subject :) So i have looked at the options we have to do this.

1/ http://drupal.org/node/17565
2/ http://drupal.org/node/23348
3/ sections module

For my situation, i need certain nodes to have a different style.css file included. Looking at the code below (from option 2 above)...

<?php
if ($is_front) {
    include 'page_front.tpl.php';
    return;
}
if ($node->type == 'nodetype') { // all pages on my site are 'nodetype'
    $my_path = explode("/", drupal_get_path_alias('node/'.$node->nid)); // all pages have path like 'section/page'
    $my_path = $my_path[0];
} else {
    $my_path = arg(0);
}
switch ($my_path) {
    case 'using':
        $section = 1;
        break;
    case 'education':
        $section = 2;
        break;
    case 'company':
        $section = 3;
        break;
    case 'image':
        $section = 4;
        break;
    case 'forum':
        $section = 5;
        break;
    default:
        $section = 0;
}
$css_section = 'section'.$section;
?> 

Can someone explain, if i need just one set of path aliases to have a different style added (ie parenttopic/*)...how would i do this with the above code?