Skip to main content

Validity Period

Comments

6 comments

  • Zendesk API User
    Author: thmarx - 6/27/2016 9:40

    Hey Seth,

    could you please provide more information.

    What is your use case?

    What are you generating with FS? Just XML or HTML to?

    What is that "the application layer"? Is this some kind of web app developed by yourself?

    Thorsten

    0
  • Zendesk API User
    Author: tenter - 7/18/2016 11:01

    Hi Seth,

    does anything prevent you from just using getLifeSpan() on a section? Sounds like this is exaclty what you need.

    Hannes

    EDIT: Nevermind, I just realized that doesn't help you at all. Did you find any appropriate solution for the problem in the mean time? A colleague of mine suggested to configure and save the validity period somewhere else, maybe in the meta data. Could that help you?

    0
  • Zendesk API User
    Author: sglock - 7/20/2016 20:02

    Hi Seth! Your plan is to render all sections regardless if they are "valid" at the generation point of time, specifically those which will only be valid in the future. Time control is handled "on the glass" based on the timestamps - is that right?

    IIRC the behavior depends on how you render the sections:

    $CMS_VALUE(#global.page.body(…))$

    will always consider the validity period and not contain future or past content.


    Using an iteration instead will ignore the validity period and render out all sections:

    $CMS_FOR(section, body.getChildren(class("de.espirit.firstspirit.access.store.pagestore.Section")$

    $CMS_VALUE(section)$

    $CMS_END_FOR$

    This also renders those which are excluded from output via checkbox - you might want to filter these and watch out for other side effects.

    0
  • Zendesk API User
    Author: seth_w_jackson - 7/29/2016 18:19

    Thanks Seb. That makes sense for the XML generation but how does this integrate with WebEdit? Will I need to modify the preview channel when in WebEdit mode to consider the date on the slider and evaluate it in the channel?

    0
  • Zendesk API User
    Author: sglock - 7/29/2016 19:58

    That depends on how the rendering logic for the preview was implemented. If you're using

    $CMS_VALUE(#global.page.body(…))$

    to render the section's content to preview, timecontrol in ContentCreator should work right away.

    0
  • Zendesk API User
    Author: pavone - 8/16/2016 8:09

    Hello Seth,   

    do you need further help or did Sebastian's reply already help you? If so, it would be great if you marked his reply as "correct answer" so that other community users find the solution easily. If you have already found a solution by yourself, it would be very kind of you, if you posted it here.

    Best regards 

    Tim

    0

Please sign in to leave a comment.