Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

update a page through query


Go to End


3 Posts   1609 Views

Avatar
blaise4714

Community Member, 10 Posts

24 January 2010 at 10:31am

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

Avatar
zenmonkey

Community Member, 545 Posts

25 January 2010 at 3:54am

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

Avatar
blaise4714

Community Member, 10 Posts

25 January 2010 at 6:56am

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.