Page 1 of 1

What is the difference between this countmodules

Posted: Sun Sep 29, 2019 3:31 pm
by shaibustephen
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') :?>

Re: What is the difference between this countmodules

Posted: Mon Sep 30, 2019 12:16 am
by toivo
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.

Re: What is the difference between this countmodules

Posted: Wed Oct 16, 2019 7:40 pm
by diaz365
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; ?>