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

Anyway to make content appear on a certain day in local time


Go to End


7 Posts   1183 Views

Avatar
nzstephenf

Community Member, 63 Posts

4 April 2012 at 6:21pm

How could I make a sidebar widget that looks like the example of the attached file.

Is there anyway to have content to display on a certain day,
Like if it was a Wednesday (like today) then only Wednesday's content will display and the sidebar widget will ignore Monday, Tuesday, Thursday, Friday, Saturday & Sunday? :D

Attached Files
Avatar
swaiba

Forum Moderator, 1899 Posts

4 April 2012 at 7:56pm

i think the https://github.com/silverstripe-australia/advancedworkflow replaces the old embargo/expiry for pages that would allow you to do this.

If your hosting is not on "local time" then you'll need to cahnge the time zone in your _config.php

Avatar
nzstephenf

Community Member, 63 Posts

5 April 2012 at 9:44pm

Is there any simple way to have it shown on: http://www.silverstripe.org/assets/Uploads/Day.png ?
Just wanting the content to display in 7 boxes, Monday to Sunday :D

Avatar
swaiba

Forum Moderator, 1899 Posts

5 April 2012 at 9:50pm

I thourght I recognised you and the question...

http://www.silverstripe.org/general-questions/show/16785

Avatar
nzstephenf

Community Member, 63 Posts

6 April 2012 at 8:34pm

Haha you sure did recognize, I use this account now because it uses my primary email and I can't remember the email anymore for the other account.

But is there any PHP code that can allow the content to display on a certain day though?
Because I always do not know how to write out the code in the template.

<% if ????? %>
<% else %>
<% end_if %>

I do not know how to write out the SS template after writing out the coding

Avatar
swaiba

Forum Moderator, 1899 Posts

6 April 2012 at 11:07pm

please read/work through the tutorials and the previous thread where this question was answered

Avatar
nzstephenf

Community Member, 63 Posts

7 April 2012 at 1:38am

I'm wanting to make the content changeable as if it was on a tab for a certain page type. And it only shows HTML Content WYSIWYG editor 7 times, one for every day of the week... the workflow module kind of doesn't help me.. Still managing to get use to SilverStripe even though I've used it in a minor way years back :P