BenMcKenzie Posted August 20 Posted August 20 (edited) Hi all! Our site was set up with a link directly to the Events Page, which was named Upcoming Events. As fits the name, we only want to display future events, not past ones. The Events Page only has the Events section on it. However this means when we have no upcoming events, the Upcoming Events page is just blank. I know I can add some permanent text above the events, but we'd prefer to have a message display only when there aren't any upcoming events. I've found a workaround using JavaScript to display text when a Summary block is empty, but is there an equivalent trick for the Events section on the main Events page? I'd like to avoid having to rename and unlink the page and create a new page with a summary block just for this purpose. Cheers in advance, Ben Edited October 22 by BenMcKenzie Corrected typo and minor formatting
Solution tuanphan Posted October 15 Solution Posted October 15 You can use this to Website Tools > Custom CSS div.events-list:has(.eventlist.eventlist--upcoming):before { display: none; } div.events-list:before { content: "No Events Now"; display: block; font-size: 30px; text-align: center; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
BenMcKenzie Posted October 22 Author Posted October 22 On 10/16/2024 at 12:50 AM, tuanphan said: You can use this to Website Tools > Custom CSS div.events-list:has(.eventlist.eventlist--upcoming):before { display: none; } div.events-list:before { content: "No Events Now"; display: block; font-size: 30px; text-align: center; } This worked great, thank you!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment