Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Silverstripe 3.1 CMS split view - preview redirect

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 325 Views
  • BenWu
    Community Member
    90 Posts

    Silverstripe 3.1 CMS split view - preview redirect Link to this post


    I found one problem with the split view:

    I got some script to redirect a page to another depending on what user group is logged in to the site. Unfortunately, when the editor try to edit this page in the CMS, he is redirected the whole thing to another page.

    I wonder if there is a way to disable the preview panel totally? Personally, i think the preview panel is just a distraction. and it doesn't work well for complex websites.


  • Double-A-Ron
    Community Member
    604 Posts

    Re: Silverstripe 3.1 CMS split view - preview redirect Link to this post

    So are you checking the group before the redirect? And are the groups with access to the CMS preview different groups?

    What you do in this case is over in your code where you do the redirect, you give it a bypass if an Admin (or whatever group you choose) user is already logged in so it doesn't happen in preview mode.

    if(!Permission::check('ADMIN')) {
    // Redirect

    The one trouble I have found with this is that this also applies if an admin is logged in to the CMS and ventures over to the frontend. This code will bypass the redirect and behaviour might not be as expected depending on how your app works. Shouldn't be a problem if the Frontend logins use Silverstripe's member class too.

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.