Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dominik 711 posts 733 karma points
    Aug 14, 2012 @ 11:59
    dominik
    0

    Get Remove At date

    Hello I am trying to create some news section and therefore its necessary to get the Remove at date of the News item.

    The razor cheat sheet just mention CreateDate and UpdateDate 

    I tried ExpireDate but this does not work

    I am using umbraco 4.7.0

    Item.CreateDate does work but i am not able to get the Remove date :-)

    Once i am able to get this remove date can i just ask if datetime > RemoveDate - If yes hide it?

  • Richard Brookes 34 posts 57 karma points
    Aug 14, 2012 @ 12:08
    Richard Brookes
    0

    Hi Dominik,

    This should not be necessary. If you are setting a date to unpublish the news item it should be unpublished at that point and therefore will not appear in your list.

    Thanks

  • dominik 711 posts 733 karma points
    Aug 14, 2012 @ 12:14
    dominik
    0

    I tried it by setting it one year in the past but item is still shown.

    Remove At date does not work

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 14, 2012 @ 12:15
    Fuji Kusaka
    0

    Hi Dominik,

    You can get the Remove At or Expire Date working by using uComponents and XSLT.

    <xsl:value-of select="umbraco.library:FormatDateTime(ucomponents.nodes:GetExpireDate(@id), 'dd MMM  yyy')"/>

    //fuji

     

     

  • dominik 711 posts 733 karma points
    Aug 14, 2012 @ 12:17
    dominik
    0

    yes but how can i get it in razor? I am switching from xslt to razor

    THanks

  • Richard Brookes 34 posts 57 karma points
    Aug 14, 2012 @ 12:28
    Richard Brookes
    0

    Hi Dominik,

    Sorry I didn't realise that this was a bug in 4.7.0 I have just tested in a 4.7.2 installation and the remove at date seems to be working fine in that version. Obviously if you can't upgrade for any reason then this is no help to you but if you can I would suggest you just upgrade your installation to fix the bug.

    cheers

  • dominik 711 posts 733 karma points
    Aug 14, 2012 @ 12:35
    dominik
    0

    I am not able to update to a newer version at the moment.

    I think remove at and publish at are not working for any page i create

Please Sign in or register to post replies

Write your reply to:

Draft