MODX Community

Can't call getDate uncached

Why won’t this work?

         <div class="badge">Kampanj</div>

If I call getDate cached (without !) it works, but I’m worried it might at some point cache the date and give the wrong output…?

Just an idea: Have you tried modifying the [[!getDate]] to match exactly your given format from your TV?

// e.g. 

You could also format the TVs given output to match:

  <div class="badge">Kampanj</div>

This would only make sense if for some reason [[getDate]] and [[!getDate]] have different output formats, but maybe it’s worth a shot…


         <div class="badge">Kampanj</div>

would do it?

Yes!!! @bruno17’s suggestion with the extra exclamation mark did the trick it seems :slight_smile:

Just as a side note, oddly enough it works without the extra exclamation mark in a chunk:

        <div class="badge">Kampanj</div>


Thanks both of you for your help!

1 Like

this works, because the placeholder in this case is parsed while iterating over the items and its not cached in this case.