Problem converting templates (1.5->1.7) - $this-countModules

Everything to do with Joomla! 2.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
iSolve
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 18, 2011 12:03 pm

Problem converting templates (1.5->1.7) - $this-countModules

Post by iSolve » Wed Oct 19, 2011 11:39 am

Hey all,

New to Joomla and the forum and hoping someone can shed some light on an issue I am encountering whilst converting a custom 1.5.x template to work in Joomla 1.7.1.

I have successfully upgraded an old 1.5.15 Joomla install to version 1.7.1, using the documentation on joomla.org and the suggested methods (using jupgrade). Have also followed the guidelines at:

http://docs.joomla.org/Upgrading_a_Joom ... Joomla_1.6

to convert my existing templateDetails.xml file in the template directory.

Now I am having issues loading the modules that existed in the old template, so that areas that should contain navigation etc are just blank on the page.

Have briefly tried to debug the issue with the following if statement in the templates index.php:

Code: Select all

if ( $this->countModules('top-content') ) {
      echo "top-content MODULE FOUND!";
      echo $this->countModules('top-content');
      echo $app;
} else {
      echo "top-content MODULE NOT FOUND!";
      echo $this->countModules('top-content');
      echo $app;
}
The output of which is:

"top-content MODULE NOT FOUND!0"

With the 0 obviously representing the number of modules found

Any ideas/suggestions greatly appreciated!

iSolve
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 18, 2011 12:03 pm

Re: Problem converting templates (1.5->1.7) - $this-countMod

Post by iSolve » Wed Oct 19, 2011 11:59 am

Think ive got it!

After a search (sorry should have done one first), another post from tschumler inspired me:

http://forum.joomla.org/viewtopic.php?p ... 0#p2630760

"The modules are given in Joomla. You can define positions in your template and then publish the Joomla modules in these positions. Your logo picture is a file which you position within your index file or CSS stylesheet."

I didnt realise modules were defined and setup separately from the templates (i wrongly assumed everything was bundled and setup within templateDetails.xml)

Anyway I went to Extensions > Module Manager and found the module I was trying to load (top-content), and noticed a dropdown on the page: Module Assignment was set to "No pages". So I changed that to "On all pages" and my menu has appeared! W00p!


Locked

Return to “Templates for Joomla! 2.5”