By peterspieg on Wednesday, 28 September 2022
Replies 9
Likes 0
Views 793
Votes 0
Hello,
I would like to show all events, past and upcoming (I already have that working).
But, is it possible to mark the past events? Maybe with an other color, of use a strikethrough text?
Is this possible?
Regards, Peter
Use the layout editor and include

{{Show Past or Future:PAST_OR_FUTURE}}

It will add a value you can use as classname of 'past' or 'future'
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
I am using the module to show the events.
Where do I have to add this {{Show Past or Future:PAST_OR_FUTURE}} ?

Regards, Peter
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
See https://www.jevents.net/frequently-asked-questions/custom-format-strings

use

${Show Past or Future:PAST_OR_FUTURE}

in the module
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry to bother you, but I don't completely understand it.

I have used in the module:

<br><span class="icon-calendar"></span>${startDate(%d %b %Y)}[!a:<br/><span class="icon-time"></span>${startDate(%H:%M)} - ${endDate(%H:%M)}]
<span class="icon-hand-right"></span><strong>${title}</strong><br><span class="icon-globe"></span>${location}
${Show Past or Future:PAST_OR_FUTURE}

I checked the output with the inspector, but don't see any difference between past and future events.
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry - more haste less speed. It should be just

${PAST_OR_FUTURE}
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
So, I have added ${PAST_OR_FUTURE} and put it in the module as this

<span class="${PAST_OR_FUTURE}"></span>

The inspector shows

<tr class="jevrow0">
<td class="mod_events_latest_first">
<span class="past"></span>
<br>
<span class="icon-hand-right"></span>
<strong>
<span class="mod_events_latest_content"><a href="/agenda-items/evenementdetail/11/-/sport-en-spel" target="_top">Sport en spel</a>
</span>
</strong>
<br>
<span class="icon-calendar"></span>
<span class="mod_events_latest_date">21 sept 2022</span>
<br>
<span class="icon-time"></span>
<span class="mod_events_latest_date">13:00</span>
-
<span class="mod_events_latest_date">17:00</span>
<br>
<span class="icon-globe"></span>
Blauw/Wit hal Amsterdam
<br>
</td>
</tr>

So, I am in the right direction; But what I can't figure out is how can I (for only past events) make the strikethrough title of the event.

Thanks for all the help so far!! Greatly appreciated.
Peter
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Use this in your custom css

.mod_events_latest_first .past
{
ADD THE CSS YOU WANT HERE
}
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

this is really driving me crazy.
Your latest code doesn't do anything:

.mod_events_latest_first .past {text-decoration:underline;}

So, I have tried:
.mod_events_latest_first, .past {text-decoration:underline;}
and it modifies only the first "past event". I would like to have all the past events get a underline.

I also tried:.
mod_events_latest .past {text-decoration:underline;}
no changes

I am lost. Sorry
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
use the dom inspector to see what selector you need for the other events - you can see in your earlier post that the first event is wrapped by "mod_events_latest_first" class. There will be another selector for the other events
·
2 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post