Is it possible to remove the “Upload MM Component” button from the SDL Tridion 2011 Ribbon

放肆的年华 提交于 2019-12-01 17:33:36
Boris Ponomarenko

One of the solutions is to create extension for the NewBasicMultimediaComponent command, which extends isAvailable and isEnabled methods and returns false for them. In this case "Upload MM Component" still will be present as an option for "New Component" button, but it will be disabled.

I've used css to hide the display of ribbon items before. Purely because I couldn't find the appropriate solution.

I'm adding this answer because I needed to do something similar with a complete ribbon toolbar.

I needed to remove the complete ribbon toolbar "Create" in order to add a simpler version of it and it seems you can do the removal part by creating a new extension and use this in your extensions config:

<?xml version="1.0"?>
<Configuration xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge" xmlns:cfg="http://www.sdltridion.com/2009/GUI/Configuration" xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions" xmlns:cmenu="http://www.sdltridion.com/2009/GUI/extensions/ContextMenu" xmlns:edt="http://www.sdltridion.com/2009/GUI/Configuration/Merge">
    <resources>
        <cfg:groups />
    </resources>
    <definitionfiles />
    <extensions>
        <ext:editorextensions>
            <ext:editorextension target="CME">
                <ext:editurls />
                <ext:listdefinitions />
                <ext:itemicons />
                <ext:taskbars />
                <ext:commands />
                <ext:commandextensions />
                <ext:contextmenus />
                <ext:lists />
                <ext:tabpages>
                </ext:tabpages>
                <ext:toolbars>
                </ext:toolbars>
                <ext:ribbontoolbars>
                    <ext:remove>
                        <ext:extension id="CreatePage">
                            <ext:apply>
                                <ext:view name="DashboardView">
                                    <ext:control id="DashboardToolbar" />
                                </ext:view>
                            </ext:apply>
                        </ext:extension>
                    </ext:remove>
                </ext:ribbontoolbars>
                <ext:extendedareas />
            </ext:editorextension>
        </ext:editorextensions>
        <ext:dataextenders />
    </extensions>
    <commands />
    <contextmenus />
    <localization />
    <settings>
        <dependencies />
        <defaultpage />
        <editurls />
        <listdefinitions />
        <theme>
            <path>/Themes/</path>
        </theme>
        <customconfiguration />
    </settings>
</Configuration>

To make this work for buttons you probably can do the same thing (haven't tested this), by providing the button id in the ext:extension id attribute.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!