Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Just wondering is there documentation on usage? Specifically how to create backoffice previews of content? I can't seem to find it.
I don't believe there is detailed documentation yet, however in order to get back office preview working there are a few steps to adhere to.
1) in Views/Partials create a folder called "stack"
2) Create cshtml views who's name match the alias of the document type you are previewing - e.g. "programmeEntry"
3) Ensure these views inherit from UmbracoViewPage
These worked for me as these are the rules that StackedContent uses to look for its views. It doesn't use Angular Views in the preview which is key to remember.
nice one Nik, that worked a treat.
What's the recommended way to check (in the custom view) if we are rendering in the back office, vs rendering on the front end?
I suppose something like this would work in the view file:
bool isFrontEnd = UmbracoContext.Current.IsFrontEndUmbracoRequest;
(Pulled from LeBlender actually)
This shouldn't have any effect on cache though? If I provide alternate HTML when viewed from the back office vs front end?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted