English 中文(简体)
是否有可能从SDL Tridion 2011 丝带中删除“ 上装入 MM 组件” 按钮?
原标题:Is it possible to remove the "Upload MM Component" button from the SDL Tridion 2011 Ribbon

此按钮会给客户端带来很多问题, 因为它总是使用预定义的 Schema 。 我无法找到方法用编辑器配置来删除此按钮 。 我用其他按钮做了此操作, 但是这些按钮是在某种子组中执行的 。

在我的个人沙箱机上,我试图删除下列./WebUI/Editors/CME/Control/Toolbars/Tabs/CreateRibbonPage.ascx文件摘录中评论的控制:

<c:RibbonSplitButton runat="server" CommandName="NewComponent" 
   Title="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>" 
   Label="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>"
   ID="NewComponentBtn1">
  <c:RibbonContextMenuItem runat="server" ID="NewComponentCMI2" 
     Command="NewComponent" 
     Title="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>" 
     Label="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>" />
  <c:RibbonContextMenuItem runat="server" ID="NewMultimediaComponentCMI2" 
     Command="NewMultimediaComponent"  
     Title="<%$ Resources: Tridion.Web.UI.Strings, NewMultimediaComponent %>" 
     Label="<%$ Resources: Tridion.Web.UI.Strings, NewMultimediaComponent %>" />
  <!--
  <c:RibbonUploadContextMenuItem runat="server" 
     ID="NewBasicMultimediaComponentCMI2" Command="NewBasicMultimediaComponent"  
     Title="<%$ Resources: Tridion.Web.UI.Strings, NewBasicMultimediaComponent %>"
     Label="<%$ Resources: Tridion.Web.UI.Strings, NewBasicMultimediaComponent %>" />
  -->
</c:RibbonSplitButton>

这似乎产生了预期的结果,但我认为,如果我在客户环境中这样做,这可能会使我们的支持协议无效。 这是有可能以支持的方式实现的,还是我必须黑进UI这样的文件才能实现我的目标?

最佳回答

其中一个解决方案是为 NewBasicMultimedia Concomponent 命令创建延伸,该命令扩展了 isAvailable enabled 方法,并返回了 false 。 在这种情况下,“ 上传 MMM 组件” 仍会作为“ 新组件” 按钮的选项存在, 但将被禁用 。

问题回答

我之前用CS来隐藏丝带物品的显示。 纯粹是因为我找不到合适的解决办法。

我加上这个答案是因为我需要做一些类似的事情 用一个完整的丝带工具栏。

我需要删除完整的丝带工具栏“Create”, 以便添加一个更简单的版本, 似乎您可以通过创建新的扩展名来完成删除部分, 并在扩展配置中使用此功能 :

<?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>

要对按钮进行此工作, 您也许可以在 ext: extension id 属性 中提供按钮 id 属性, 来做同样的事情( 已经测试过此选项 ) 。





相关问题
Getting URL of published element in SDL Tridion

Is there any way of finding the absolute URL for a published object in the SDL Tridion Interface? For example when I published a page, how can I find the url where to access the page?

What is C# sample code for VBScript SetLocale Function

I have got below code in VBScript. Sub SetPageLocale() Dim Locale Dim ContextObject Set ContextObject=getContextObject Locale=getFieldValue(ContextObject.Publication.MetadataFields("...

Getting error while using TCMUploadAssembly.exe

Can you please suggest why I am getting below error, when I am trying to upload my Assembly using TCMUploadAssembly.exe, below is the setting which I have done in my POST Build event. $(ProjectDir)...

Component Links not working in 64 bit mode

Brief Summary: We are using Tridion 2009 SP1, however we never used .NET templating, we are still using R5 concept i.e. (VBScript, XSLT etc), we are using broker database for our linking etc. Our ...

热门标签