0

I have the following code:

{exp:ce_cache:escape:last_updated}
{if ({current_time format="%U"} - {edit_date format="%U"})/3600 < 8}Updated {edit_date:relative}{/if}
{/exp:ce_cache:escape:last_updated}

This code displays a text on how old an entry is for the first 8 hours. But it does not escape the caching. When placing the escape around the {edit_date:relative} it does not generate the time, only text.

Please help out if you can.

Best regards, Harold

1
  • I would suggest not caching this line to begin with. Performing a numerical date comparison is quick work. However, you can try using a nested template where the nested template contains your inner logic and the ce_cache:escape wraps the template include. Aug 26 at 5:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.