I have a client who wants to create a single page design for his site, where the content of each "page" is displayed / hidden using javascript when the user navigates the site.
I'm not sure how best to approach this with Orchard. One option would be for the content to be contained in one element of the page content, and then you would lose the ability to use the Orchard navigation features and could not allow the client to think about administration in terms of pages.
Does anyone have any ideas or impressions on how best to configure this in Orchard CMS?
Here's the solution I used based on Bertrand's recommendations:
public ActionResult Display(int id)
{
var contentItem = _contentManager.Get(id, VersionOptions.Published);
dynamic model = _contentManager.BuildDisplay(contentItem);
var ctx = _workContextAccessor.GetContext();
ctx.Layout.Metadata.Alternates.Add("Layout_Null");
return new ShapeResult(this, model);
}
, . . _contentManager _workContextAccessor . Layout.Null.cshtml , .