Tag Archives: snippets

Controlling Joomla! templates depending on menu you use

We have been working on building a multi-school Joomla! website and there have been many hurdles to overcome since Joomla! isn’t a multi-site CMS. After searching for anything that’s common across each school, I realized the menu for each school could be used as a common denominator. If I could set a variable depending on which menu is loaded on the page then I can do just about anything I want, such as change the logo, set a unique CSS class, etc. After meeting with our developers we figured out how to do this and I’ll share it with all of you in case you ever need to do the same.
Continue reading

How to use countModules in any Joomla! file

One of the core parts of creating Joomla! templates is using $this->countModules to show or hide code depending on if a module is in a particular position on the page. It is very powerful and it makes your templates very dynamic according to what is happening on the page. So what happens if you need to do this outside of the template index.php file? Save yourself a huge headache and use the following code in any file to check for a module position:

jimport( 'joomla.application.module.helper' );
if(count(JModuleHelper::getModules('left'))) {
	put your code here
}

A very powerful addition to you Joomla! PHP library!

New Store + New Products = New future

Check out the changes in the ‘corePHP’ store! It has been rebuilt from the ground up. All of our old products are available, plus many new ones like Community ACL and WordPress. We also have a number of products in development…keep reading for a sneak peek of future releases! Of course, we’re not sharing everything.  We want some of it to remain a surprise! Continue reading