Condition Module

With a module, Joomla have following filters to show/hide the module:

  • Start - Finish Publishing: Display the module in the time period
  • Access: Display module based on User access level (guest, member, admin)

Question: Have you ever thought how to show/hide module with advanced variables? For example, based on the value of the input variables.


I have a module (ID=1) and I put it in the search page. I want this module to display only when the keyword is "Hello".

Obviously, with Joomla basic filters you can't do this. That's why I wrote this module ;).


>> Download the module here: Buy Now ( $10 )

After downloading, you need install it via Joomla installer. Next, go to Module Manager > New > Condition Module to get started.

In this module, you will see two fields:

  • PHP Condition.
  • List Modules

Going back to the example above, you will solve this issue if enter this code into PHP Condition.

$q = @$_REQUEST["q"];
return $q=="Hello";

And this code into List Modules.

{loadmoduleid 1}

Note: This module is only for those who know about the PHP language.

You may also like

K2 to Content Migration

File Manager Extension for Joomla

Best Free Joomla 4 Templates of 2022

Say something here...
You are a guest ( Sign Up ? )
or post as a guest
People in conversation:
Loading comment... The comment will be refreshed after 00:00.
  • This commment is unpublished.
    Nick · 1 years ago
    No luck with the example code above. The module is not showing up.
    • This commment is unpublished.
      David · 1 years ago
      @Nick In your case, it should: return strtolower($searchword)=="hallo";
      "Hallo" # "Hello"
    • This commment is unpublished.
      Nick · 1 years ago
      @David I tried again with (But no luck) ->

      My Search URL:

      PHP Condition:
      <?php $searchword = @$_REQUEST["searchword"]; return $searchword=="Hello";
      List Modules:
      {loadmoduleid 67}
    • This commment is unpublished.
      David · 1 years ago
      @Nick The module will show if your URL have ?q=hello😉

Powered By JLex Comment.