InMotion Hosting Support Center
This is archived and no longer maintained. Any information contained in this article may be out of date.

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here.

As we continue to review the code in the Beez2 template, we come across the following code:

// check modules
$showRightColumn        = ($this->countModules('position-3') or $this->countModules('position-6') or $this->countModules('position-8'));

  1. Based upon the name of the variable, showRightColumn, it appears the template is trying to figure out whether or not to show the right column of the template.
  2. Based upon the function called, countModules, it would appear that showRightColumn is going to be the value of how many modules are shown in each of the listed positions.

Before testing further, we will assume that if neither position-3, position-6, or position-8 have any modules being loaded, then showRightColumn will have a value of 0. Because it has a value of 0, the template would not show the right column.

What is the value of $showRightColumn?

At this point in our testing, we have:

  • 2 modules loaded in position-3
  • 1 module being loaded in position-6

When we make an adjustment to the template file to show the value of $showRightColumn, we see the value is 1. This means that showRightColumn is not the count of modules being shown, but whether any modules are shown in the list of positions. If there are no modules being loaded, then the value will be 0. Otherwise, the value will be 1 if there are any modules being loaded.

Our Testing Code The results

// check modules
$showRightColumn        = ($this->countModules('position-3') or $this->countModules('position-6') or $this->countModules('position-8'));
echo "showRightColumn = $showRightColumn"; die();


Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!