Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

Basic Modul - display "no event planned" 6 years 8 months ago #24141

Hi;

is there a possibility to display a short comment if there is no actual event? Just like "no event polanned in the near future" or "keine aktuelle Veranstaltung"??

Please Log in or Create an account to join the conversation.

Basic Modul - display "no event planned" 6 years 8 months ago #24150

Go to JoomlaRoot -> modules -> mod_jem -> tmpl and edit default.php
at line 15 you see: "<?php if (count($items)): ?>" which is closed at line 45.
so add the following before line 45:
<?php else : ?>
<?php echo JText::_('COM_JEM_NO_EVENTS'); ?>

I recommend to use template overrides to change this. Otherwhise, after an update your changes would be removed.
Go to JoomlaRoot -> templates -> yourTemplateName -> html -> mod_jem, if some folders do not exist, create them.
Copy the default.php with your changes to the created folder.
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

Last edit: by Egnarts.

Basic Modul - display "no event planned" 6 years 8 months ago #24151

I don't get this to work

Please Log in or Create an account to join the conversation.

Basic Modul - display "no event planned" 6 years 8 months ago #24153

I could imagine how.
Because JText looks for the text in the module language file. It should work if you write real text.
e.g.: <?php echo "Currently no events planned." ?>

Please Log in or Create an account to join the conversation.

Basic Modul - display "no event planned" 6 years 8 months ago #24154

this doesn't work.

What I made:
I choosed a category "meetings" with no events inside.
Then I tried with your proposals: but there's only the title of the module

Please Log in or Create an account to join the conversation.

Basic Modul - display "no event planned" 6 years 8 months ago #24160

Ahh I found the solution :)
In theory, my first approach was correct, but there is a bug in the code.
Change line 15: <?php if (count($items)): ?> to <?php if (count($list)): ?>
than add before line 45:
<?php else : ?>
<?php echo JText::_('COM_JEM_NO_EVENTS'); ?>
The following user(s) said Thank You: jojo12, tschiwi

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.263 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......