18

I am creating a GUI extension for Experience Manager in Tridion 2011 and would like to hide the "Preview Page" tab page. I have tried adding the following piece of code to the my extension config file with no result.

<ext:tabpages>
    <ext:remove>
        <ext:extension id="PreviewPage">
            <ext:apply>
                <ext:view name="EditorView">
                    <ext:control id="MainToolbar" />
                </ext:view>
            </ext:apply>
        </ext:extension>                        
    </ext:remove>   
</ext:tabpages> 

I know that I can hide the "Preview Page" tab using the following code in a script:

var toolbar = $controls.getControl($("#MainToolbar"), "Tridion.Controls.RibbonToolbar");
var page = toolbar.getPageById("ReviewPage");
page.hide();

but I would prefer to use the config file if only I knew how.

Any ideas?

21

If you mean hidding the tab "Preview" in the ribbontoolbar of the experience manager you have to add that code in the "ext:ribbontoolbars" section of the configuration file, like this:

        <ext:ribbontoolbars>
            <ext:remove>
                <ext:extension id="PreviewPage">
                    <ext:apply>
                        <ext:view name="EditorView">
                            <ext:control id="MainToolbar" />
                        </ext:view>
                    </ext:apply>
                </ext:extension>                        
            </ext:remove>   
        </ext:ribbontoolbars>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.