Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Metamod returning 1 when using countModules

Metamod returning 1 when using countModules

I have the following code in my template:
<?php if ($this->countModules('left')?1:0) : ?>
<div id="left">
    <jdoc:include type="modules" name="left" />
</div>
<?php endif; ?>

But it returns 1 although there are no modules returned from the conditions in Metamod. What I need is a way to detect if metamod returns anything, please.

J!2.5.7
Metamod 3.11
Site is local for now.

klausbach
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Metamod returning 1 when using countModules

Hi Klaus,

this is the expected behaviour for MetaMod when you are not using the Pro version. It will count the MetaMod as 1 no matter how many other modules it includes, because they are simply output inside that 1 MetaMod.

If you use the Pro version, then the MetaMod itself is not counted. Only the modules that MetaMod include will be counted, and I think that's what you're after.

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1680
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10831
Newest User:
bluesky1
Members Online:
0
Guests Online:
165

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked