What is the difference between this countmodules

Everything to do with Joomla! 3.x 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.
Post Reply
shaibustephen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 177
Joined: Sat Nov 17, 2018 1:52 pm

What is the difference between this countmodules

Post by shaibustephen » Sun Sep 29, 2019 3:31 pm

What are the difference between this countmodules below and at what point should one use them?

<?php if($this->countModules('position-6') || $this->countModules('position-8') || $this->countModules('position-3') :?>

<?php if($this->countModules('position-6') or $this->countModules('position-8') or $this->countModules('position-3') :?>

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11529
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: What is the difference between this countmodules

Post by toivo » Mon Sep 30, 2019 12:16 am

Those two conditional statements work the same way because both logical operators mean 'or'.

It is up to you where in your template you want to use them.
Toivo Talikka, Global Moderator

diaz365
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Thu Oct 03, 2019 3:41 pm
Contact:

Re: What is the difference between this countmodules

Post by diaz365 » Wed Oct 16, 2019 7:40 pm

IF modules are active the it shows. The code <!-- Add IF Code Here --> "link"

Code: Select all

<?php if($this->countModules('top and menu and left and right and bottom and footer and position-0 and position-1 and position-2 and position-3')) : ?> 
 
link


<!-- Add IF Code Here --> 
 
 <?php endif; ?>

You do not have the required permissions to view the files attached to this post.


Post Reply

Return to “Templates for Joomla! 3.x”