One plugin which I found: http://wordpress.org/extend/plugins/widget-context/
Welcome to our blog! Here you can find stuff about web development, software engineering, WordPress & about our projects and interests.
Create a php file with some unique name (like snarfer.php) and put it in your WordPress theme directory.
This is the way you create a WordPress Page templates:
<?php /* Template Name: Snarfer */
First, we need to find out what the page class suffix is for the page we are visiting. To do this, you will need add some code to your template:
To load the page class suffix associated with the current Itemid, add this to the top of the index.php file:
<?php $itemid = JRequest::getVar('Itemid'); $menu = &JSite::getMenu(); $active = $menu->getItem($itemid); $params = $menu->getParams( $active->id ); $pageclass = $params->get( 'pageclass_sfx' ); ?>
To load the page class suffix associated with the active menu item, add this to the top of the index.php file: (For sub-pages with no active menu item, this will load the page class suffix for the default menu item.)
<?php $menus = &JSite::getMenu(); $menu = $menus->getActive(); $pageclass = ""; if (is_object( $menu )) : $params = new JParameter( $menu->params ); $pageclass = $params->get( 'pageclass_sfx' ); endif; ?>
(credit: Page Class Suffix in template code)
You should always use htmlspecialchars() in your code before writing something into an HTML attribute, else you open up an attack vector to inject script code into your page.
The next step is to use the page class suffix somewhere in the template.
The more common method would be to apply the page class suffix as an id or class to the <body> tag. Find the <body> tag (below the </head> tag) and replace it with this:
<body id="<?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?>">
The second method would be to load a stylesheet unique to the page in question. Instead of modifying the <body> tag, look for the stylesheet link within the <head></head> tags and add the following line directly beneath it:
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/<?php echo htmlspecialchars($pageclass) ?>.css" type="text/css"/>
For more info: http://docs.joomla.org/Using_the_Page_Class_Suffix_in_Template_Code