Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8939457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:49:41+00:00 2026-06-15T10:49:41+00:00

Working on a site in Joomla 1.5! Typically when testing if a module position

  • 0

Working on a site in Joomla 1.5! Typically when testing if a module position is empty in Joomla! I’d do something like this:

<?php if ($this->countModules('position')): ?>
    BEFORE
    <jdoc:include type="modules" name="position" style="xhtml" />
    AFTER
<?php endif; ?>

But in my case I have a jumi module that references external source of code.
jumi module that references external source of code

In some situations it will be blank, which in that case, I don’t want the BEFORE and AFTER bits showing either. But whenever I try running the above code, the before and after sections show up, because
$this->countModules() returns 1 instead of 0.

I have “Hide if empty” set to “Yes” for the module, but that doesn’t seem to help.
hide if empty

I’ve even tried setting a return false; on the external source code but that doesn’t seem to help either.

Does anybody have any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:49:42+00:00Added an answer on June 15, 2026 at 10:49 am

    Hide if empty cannot hide the BEFORE and AFTER because it’s in the count condition.And BEFORE and AFTER will only hide if no module is enabled for that position. So to hide these you’ll have to put this content inside your module.And check the if empty condition.
    Let me know if it’s not clear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on one joomla(2.5.1) site and i need one module for one
So, I've just started working with a new Joomla site, and something we've added
I am working on smartphone site. Is there a way to set Bookmark this
I'm working on a site in Joomla! and on the homepage, at the top
I've a site built in Joomla 1.5, it was working good, after upgrading my
I am running Joomla 1.5.15. After working on my site, I decided to test
I have a joomla application working on Apache.To improve site performace we have written
I'm working on a Joomla site, and I need the front page to look
When working with open source project (like wordpress, drupal, joomla) I always find in
I am working on a site Using Joomla and virtuemart:- I want to show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.