Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Publishing a page without using CMS

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1352 Views
  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Publishing a page without using CMS Link to this post

    I am creating a page type for the GHOP that allows you to specify what times the page can be viewed for (see http://code.google.com/p/google-highly-open-participation-silverstripe/issues/detail?id=105 for more information).

    I currently have the page become unpublished when it expires, however I need a way to either publish a page or change ShowInMenus without calling the page, as it shouldn't be able to be called.

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: Publishing a page without using CMS Link to this post

    Are you talking about
    a) turning an embargoed page into one that is "normal"?, or
    b) turning a "normal" page into an expired one?

    If (a), the usability needs a little thought. I don't think we want to turn a page that is merely on the draft site into a published page. The user would need to click 'save and publish' because the user may wish to keep the page on the draft site while editing it etc. Maybe when you clicked save and publish, the message that pops back would be "Page will be brought online on Monday 23rd January 2008" to reinforce whats going to occur. Behind the scenes its up to you how to manage it, but you need to work out if its better to publish the page and add checks all over the place like "show page if expiry is null or expiry is after now()" OR only bring the page online at the right point "some how", e.g. where you do a 404 check or as an extension of DailyTask that runs on a schedule.

    (b) should be easy if visiting a page, but be careful that, lets say you have a website with a top menu of "Home About Contact". If "about" has expired and you visit the homepage you need to hide 'about', without the logic being computationally expensive. (hence a where filter at the SQL level seems good)

    1352 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.