user1888320
user1888320

Reputation: 69

Orchard CMS Showing Only Drafts

I would like to show only the draft version of documents when the user makes requests to a specific subdomain. The idea is that when requests are made to the "www.mysite.com" domain, we show the published version of documents but when requests are made to the "wip.mysite.com" subdomain, we show only the draft version of the documents throughout the site. What in the Orchard CMS extensibility points would I need to tap into to make this work?

Upvotes: 1

Views: 226

Answers (1)

Piedone
Piedone

Reputation: 2888

This is tricky because by default Orchard's ContentManager service returns published items. Now everywhere a content item is displayed (when a page is opened or a widget is displayed) the default behaviour is used: that's why you only see published items.

Normal items are displayed by Orchard.Core.Contents.Controllers.ItemController, containers from Orchard.Core.Containers.Controllers.ItemController and widgets from Orchard.Widgets.Filters.WidgetFilter. You could create your own controllers that fetch drafts an re-route requests to them, also you could override Orchard.Widgets.Services.WidgetsService to fetch draft widgets.

That said you probably don't want to do this :-). Maybe you are interested in something like explained in this issue?

Upvotes: 1

Related Questions