Skip to main content
Skip table of contents

Deactivate the Public View

Public View is available no matter which publishing approach is used. When not publishing within the same space, the public view doesn't provide any value and might confuse users.

With Scroll Versions 4.5.0 publishing within the same space is hidden per default and needs to be activated manually.

To deactivate Public View link in a specific space or globally

Add the line 

CSS
#sv-scmtb-misc-enable-readonlyview {display: none;}

to the space stylesheet (or globally, if you want to change it for all your spaces). This will hide the "Switch to Public View" link in the dropdown (but this will cause a tiny empty list entry in the dropdown, resulting in 'double borders').

Change background color on the page in the Public View

  1. Open the global configuration

  2. In the Look and Feel section click Custom HTML

  3. Enter the following code into the At end of the HEAD field: 

    JS
    <script type="text/javascript">
    AJS.$(document).ready(function() {
        if (AJS.$('.sv-reader-view-label').length > 0) {
            AJS.$('#main').css('background-color','rgba(243, 165, 54, 0.36)');
        }
    })();
    </script>

    This code will color the background of the page in a light orange every time the public view is displayed. You can change the color by adjusting the values in brackets next to rgba.

Automatically redirect from Public View to Author View

  1. Open the global Confluence configuration,

  2. in the Look and Feel section click on Custom HTML,

  3. enter the following code into the At end of the BODY field:

    Scroll Versions ≥ 3.11.1

    JS
    <script>
    var clickLink = function() {
                if (document.getElementById('sv-reader-view-toolbar-disable-readonlyview')) {
                    document.getElementById('sv-reader-view-toolbar-disable-readonlyview').click();
                } else {
                    window.setTimeout(clickLink, 100);
                }
            };
            clickLink();
    </script>

    Scroll Versions < 3.11.1

    JS
    <script>
    $(document).ready(function(){if(document.getElementById('sv-scmtb-misc-disable-readonlyview')){ document.getElementById('sv-scmtb-misc-disable-readonlyview').click();}});
    </script>

Clearing the public view

If you published within the same space and want to revert the publish, you can "unpublish" the public view and reset it to the state before publishing.

Before you begin: Please activate the support and maintenance REST resources in the Advanced Plugin Settings first.

Copy the following command to the browser URL field, replace the values in "< >" and hit Enter: http://<host>:<port>/<contextpath>/rest/scroll-versions/1.0/support/clearPublicView/<spaceKey>

See example URL below:

 http://localhost:1990/confluence/rest/scroll-versions/1.0/support/clearPublicView/DOC

This will remove all content, labels and attachments on master pages and mark them as "not public".


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.