No events message in menu with K2 categories

GK User
Mon Jun 29, 2015 7:19 am
Hi,

I've got an issue with the display of "no events".

I have a menu option where the menu type is "K2 - categories". In the options for the menu I choose the categories whose events I want to see, and under the option for template I have selected "events_listing1".

All works OK when I have events, but currently I have no events planned and when I click the menu option nothing appears, not even a message.

Is there a way to put a message or something on the screen to say "No events planned" in this case?

I've had a look at the K2 settings etc. and I can't see anything.

I'll include a link to the page in question. http://www.escuelamaxitrailmontealegre.com/en/events

Thanks very much.
User avatar
Junior Boarder

teitbite
Mon Jun 29, 2015 3:22 pm
Hi

There is no such message, but are You sure You have configured correctly ? I can see it's trying to use generic layout which is used for tags and search results. This element should be a type of K2 category so I'll be able to come up with a code to show such message.
User avatar
Moderator

GK User
Tue Jun 30, 2015 7:26 am
Hi Teitbite,

Thanks for replying so quickly.

Well, I think I've configured everything correctly although I don't understand what you mean by a generic layout?

I've set up the K2 categories using the "events_listing1" template, and I have the catalog Mode (in Other Layout Options) set to Yes. The rest of the options in the K2 category I've set up to hide/show fields.

What do you mean when you say "This element should be a type of K2 category"?

Thanks in advance.
User avatar
Junior Boarder

teitbite
Tue Jun 30, 2015 7:59 pm
Hi

You just said it is using "K2 category" with template, so I believe it supposed to be like that by default. Try add this code to /layout/blocks/head.php

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
$('h2.componentheading').each(function(){
if( $(this).html() == 'Upcoming Events' ) {
$(this).after('No events planned');
}
});
});})(jQuery)</script>
User avatar
Moderator


cron