Skip to Content Skip to Navigation
bobbravo2: When will it be in the app store? RT @maniacz: StarCraft 2 Gameboard: Brings StarCraft II on iOS 4 iPhone 4 and ... http://bit.ly/bpwk0O
bobbravo2: RT @PicoCalabi: RT @BerryB0Y: New iPhone 4 antenna design due at the end of September, addresses attenuation? http://goo.gl/fb/7OTP1

Adding a body class suffix to a template

Adding a class suffix to the <body> tag of a Joomla! Template

 
<?php
$menus     = &JSite::getMenu();
$menu       = $menus->getActive();
$pageclass = "";
 
if (is_object( $menu )) : 
$params = new JParameter( $menu->params );
$pageclass = $params->get( 'pageclass_sfx' );
endif; 
?>
</head>
<body class="<?php echo $pageclass; ?>">
 
Add a comment
 

Essential Joomla .htaccess addtions

The following are additions that I make to my default Joomla .htacess file. The first rule prevents visitors to see how my modules are arranged in Joomla. The second stops them from seeing the templates I have installed on my site. The XML rule is to make sure no one can read common extensions that I have installed (/administrator/components/com_#name#/#name#.xml) and checking if I'm running an old version that may have security exploits. The last and final set make Apache redirect the error pages to Joomla, because the default configuration redirects them to 404.shtml, which bypasses the Joomla error page, and also (if 404.shtml is missing) shows Apache,Linux, etc versions. The names themselves are superfluous, the only key is that they do not end in .shtml, and allow joomla to handle these errors.

###tp=1 prevention #####
RewriteCond %{QUERY_STRING} tp=(.*)
RewriteRule ^(.*)$ index.php [F,L]
###block template changing ###
RewriteCond %{QUERY_STRING} template=(.*)
RewriteRule ^(.*)$ index.php [F,L]
### Block XML File reading####
<Files ~ "\.xml$">
Order allow,deny
Deny from all
Satisfy All
</Files>
###Redirect apache error pages to joomla###
ErrorDocument 404 /not-found
ErrorDocument 403 /forbidden
ErrorDocument 401 /access-denied
ErrorDocument 500 /server-error

 

Special thanks to @brianteeman

Add a comment
   

Joomla Vision

With a clearly communicated vision joomla could easily become the most flexible & robust CMS.

My vision for Joomla:
  1. Refactor the IA to include multi-level categories & tagging
  2. Completely redesign the UX - Jquery/mootools based AJAX backend. The backend needs to have a very clear conceptual model that relates to the way the information will be presented. One of the biggest problems is that I frequently have to figure our what a radio button does by "trial and error = try this, save, refresh the frontend"
  3. Make the core bare essentials with a clear purpose - let 3rd party developers extend (they're better @ it anyways)
  4. Have 2 Joomla! versions - one that had current functions (a "starter pack") & 1 with bare minimal ("expert pack")

My main problem is that the current generation of Joomla! suffers from terrible usability. As a frequent admin & designer, I frequently have to (re)remember how to get stuff done in Joomla. I cannot expect my clients to be able to figure out how to use Joomla, I have to make tutorial videos to explain the frontend! The Backend is even more confusing and I think that it was OK 3 years ago - but it is time to see a new paradigm in Joomla usability. Add a comment
   

Page 2 of 2