I'm having a difficult time figuring this out.
There's a section in a website with events. Visitors can vote for these events, 24 hours before and after it happens. Longer before that, it has a 'attend'-button. Afterwards, it shows the average score.
As I always do, I use Croxton's stash plugin. This section, ofcourse, shouldn't be stashed.
So, at first, I had this:
<div>
{if {current_time format="%U"} - {event_time format="%U"} < -86400}
{facebook_link}
{/if}
{if {current_time format="%U"} - {event_time format="%U"} < 86400 && {current_time format="%U"} - {event_time format="%U"} > -86400}
<p>Voting open</p>
{/if}
{if {current_time format="%U"} - {event_time format="%U"} > 86400}
<p style="color: black;">{exp:bol_voting:stats entry="{event_id}"}</p>
{/if}
</div>
Now, ofcourse, because these sections get stashed, the time-checks don't matter. If we reach the time-frame in which people can vote, nothing will happen. Also, the eventual average score returned by bol_voting will be stashed.
I didn't want that, so I wrapped it in a {stash:nocache}
wrapper. All my variables, as well as my custom bol_voting module, don't get parsed anymore (event_time and facebook_link).
Anyone can save me here?
Thanks!