How would I go about setig a different background image for each page. Is there a way to set the class of the container div depending on the URL or is there a better way than that?
Yes, there are many way to do this. You can use the following sample: $option = JRequest::getVar('option'); // this is to help you to find the component on current view $taskmode = JRequest::getCmd('task'); // this is to find the current task if($option == "com_content"){ // if viewing com_content, set div style if($taskmode=="edit"){ // if current task is "edit", set div style "style1" $div = "style1"; }// otherwise set div style "style2" $div = "style2"; }elseif($option == "com_abc"){ // if viewing com_abc, set div "style3" $div = "style3"; } PHP: And many more. Add the above to your template file then you are done. Please check Joomla Docs to see details.
Yes, you can customize each and every page with the above procedure if you can get the id of the page.
Whenever i wanted to that I just assigned a different ID to every page with javascript and passed that back a corresponding CSS file. That's prolly the longest way in the world to do it though, look for faster solutions
You can do this some cases and you cannot in some others. For example, I have a menu linked to a content category. Yes, I can assign a template to this menu and all the articles belonging to that category will be affected by the assigned template. But, when I want some of those articles have different style, how can I do if I don't use "JRequest::getVar"?
davidtran - then you have to create a new menu and to add you pages in it - you dont need to create a module for this menu or to show it somewhere. After you create all the things above you can assign different template to every single page of this menu. Yes i know that this is a lot of work but in some cases this is the only thing you can do.
With my way of "JRequest::getVar", you don't need to create any menu for it because the input used can be an article id (for Joomla article content) or something similar like Sobi 2 entry id. My way is menu-independent! If you want it to be menu-dependent, you still can use my way with var of Itemid, e.g. JRequest::getVar('Itemid') where Itemid was assigned to a menu when you had created that menu.