ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Display time format within entry

March 02, 2011 2:49pm

Subscribe [3]
  • #1 / Mar 02, 2011 2:49pm

    123454329

    144 posts

    This question may be related to a resolved thread.

    I need to get this code to render within my entry:

    {edit_date format="%d. %m. %Y"}

    how can this be done, pls?

  • #2 / Mar 02, 2011 5:08pm

    Ingmar

    29245 posts

    By default, EE tags go into templates, not entries. There is a plugin, but it might be better to restructure your site accordingly.

  • #3 / Mar 02, 2011 5:41pm

    123454329

    144 posts

    As John Henry Donovan mentioned here I could put the ee time format into an embed and have it sit within my entry - using the plugin you mention. That does not work for me!

    I need an edit date within my entry.

    Tks, Ingmar.

  • #4 / Mar 03, 2011 3:50am

    John Henry Donovan

    12339 posts

    Thomas,

    Hey lets not go throwing names around here 😉

    The method I mentioned in other thread works because it uses current_time which is not associated with the entry itself unlike edit_date which needs to remain in-between your channel:entries tags and not in an embed.

    You could try Lows replace add-on

    So in your entry rather than add an embed to the custom field, add a unique word or combination of letters and numbers within your text. Say ‘Re33’ for example

    Then in your template add this

    {exp:low_replace find="Re33" replace="{edit_date format='%d. %m. %Y'}"}
      {your_custom_field}
    {/exp:low_replace}

    That make sense? Untested by the way but you know, in theory 😊

  • #5 / Mar 03, 2011 4:38am

    123454329

    144 posts

    John,
    i will try this and report back. Thank you!

  • #6 / Mar 03, 2011 10:48am

    Sue Crocker

    26054 posts

    Sounds good, let us know what you find out.

  • #7 / Mar 03, 2011 1:03pm

    123454329

    144 posts

    John,
    everything works exactly as you said - tks for that!

    which variables other than current_time can i handle through an embed?

  • #8 / Mar 03, 2011 5:58pm

    Ingmar

    29245 posts

    All global variables should work in a similar fashion.

  • #9 / Mar 04, 2011 3:05am

    123454329

    144 posts

    Ingmar, John!, Sue — Tk you all.

  • #10 / Mar 04, 2011 8:25am

    Ingmar

    29245 posts

    Anytime 😉 Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases