help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Basic Modul - display "no event planned"

Basic Modul - display "no event planned"

7 years 2 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.

Re: Basic Modul - display "no event planned"

7 years 2 months ago - 7 years 2 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:
Code:
<?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.
Last edit: 7 years 2 months ago by Egnarts.
The following user(s) said Thank You: jojo12

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

Re: Basic Modul - display "no event planned"

7 years 2 months ago
#24151
I don't get this to work

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

Re: Basic Modul - display "no event planned"

7 years 2 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.

Re: Basic Modul - display "no event planned"

7 years 2 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.

Re: Basic Modul - display "no event planned"

7 years 2 months ago
#24160
Ahh I found the solution :)
In theory, my first approach was correct, but there is a bug in the code.
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.

Time to create page: 0.451 seconds