Joomla theme change
I need to customize a joomla theme for on开发者_如何学Pythonly one of my page. Is this achievable?
Let me know the steps to do it.
Thanks in advance.
There is a simple way to achieve what you want. Joomla menu items have a parameter called Page Class Suffix. This allows you to add a CSS selector to your pages based on the menu item. You just need to use that so you can add page specific CSS so you can modify specific pages. Add this to your temaplate/index.php file:
</head>
<?php
$menu = &JSite::getMenu();
$active = $menu->getActive();
$pageclass = "";
if (is_object( $active )) :
$params = new JParameter( $active->params );
$pageclass = $params->get( 'pageclass_sfx' );
endif;
?>
<body id="<?php echo $pageclass ? $pageclass : 'default'; ?>">
Now all pages will have have either <body id="default">
or <body id="yourPageClassSuffix">
. Combine this with specifying modules per menu item and you can completely customize any page within your site without having to use multiple templates.
try it..
global $my;
$my->id; $usermname_is_id="$my->id"; if(!$usermname_is_id=="") :{?>
Check out the joomla-wiki. It is the first resource for tutorials and tips to develop your own extensions (including templates).
Here is a list of all tutorials and recommended reading within the joomla-wiki concerning templates/themes:
http://docs.joomla.org/Template_Development
If u are using Joomla 2.5
you can use different color themes of the same template in different pages
it is very easy:
- goto Extensions>>Template manager>>click on the template name
- then there is a section "Language & Page Assignments"
- in that just add pages you want with different style and pick a style from "Profiles" column.
for using different themes
- click on them name
- then select your page from "Menu Assignment" section.
In Joomla 1.5
Different themes can be used in different pages
goto Extensions>>Template manager>>click any theme name that u want in a page
then select your page from "Menu Assignment" section.
精彩评论