Jump to:

23358 Posts in 18066 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » update a page through query

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 977 Views
  • blaise4714
    Avatar
    Community Member
    10 Posts

    update a page through query Link to this post

    Hello Everybody,
    I am building a website with silverstripe and i need some directives. A page of my website should be daily update with new information (content). For this i build a table in my Mysql database. In this Table there are 2 columns: data and the validdate.
    is it possible in silverstripe to automatically update the page content at the specified date through Query on my database? How?
    Thank you in advance

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: update a page through query Link to this post

    There is an embargo/expiry module that allows for time based publishing of content, but I've heard rumours its being discontinued and I haven't actually be able to get it to work.

    But if the publishing date already exists as a date field on your data object its just a matter of wrapping the relevant part of your template with a <% if Validate.InPast %> <% end_if %> (assuming the Validate column is your Date field ). http://doc.silverstripe.org/doku.php?id=date

  • blaise4714
    Avatar
    Community Member
    10 Posts

    Re: update a page through query Link to this post

    thanks, i tried to download the module embargo, it seems that the link is down. However i dont know if this module is the quite solution of my problem, because i dont want that the page expires. Only the content of page will be update daily. in others words, when a user open the page, the valid information will be displayed, this information should come from a query on the existing database.
    Thank you for all answers.

    977 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.