Try our conversational search powered by Generative AI!

How get publish date for a Block?

Vote:
 

On a block, you can set the start publish date.

Now I want to programmatically fetch that date, to see if I shall render it or not.

But I can not find it...

Any ideas?

I think I must be missing something real simple and obvious here, but I am totally lost

/Fredrik

#115376
Jan 14, 2015 10:52
Vote:
 

Hi Fredrik ;) See this blog post from Johan Björnfot: http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2012/11/Shared-blocks--IContent/

In you case you need to cast the block to IVersionable.

#115377
Jan 14, 2015 11:03
Vote:
 

Thanks Erik, works like a charm!

#115378
Jan 14, 2015 11:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.