創建按鈕我已經創建一個用戶控件對於具有下面的另外兩個按鈕一個作爲在外表套上使用用戶控件功能區
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewItemsGroup.ascx.cs" Inherits="SDL.Examples.UI.Controls.ViewItemsGroup" %>
<%@ Import Namespace="Tridion.Web.UI" %>
<c:RibbonItemsGroup runat="server" ID="RibbonItemsGroup">
<c:RibbonButton runat="server" CommandName="ViewStaging" Title="View in Staging" Label="View In Staging" IsSmallButton="true" ID="ViewStagingBtn" />
<c:RibbonButton runat="server" CommandName="ViewLive" Title="View in Live" Label="View in Live" IsSmallButton="true" ID="ViewLiveBtn" />
</c:RibbonItemsGroup>
在extension.config如下所示我指的用戶控件。
<ext:extension assignid="ViewItemsGroup" groupid="EditGroup" name="View" pageid="HomePage" insertbefore="PublishGroup">
<ext:group>~/Controls/ViewItemsGroup.ascx</ext:group>
<ext:dependencies>
<cfg:dependency>My.Theme</cfg:dependency>
</ext:dependencies>
<ext:apply>
<ext:view name="DashboardView">
<ext:control id="DashboardToolbar" />
</ext:view>
<ext:view name="PageView">
<ext:control id="ItemToolbar" />
</ext:view>
</ext:apply>
</ext:extension>
我是否需要包括我的按鈕(一個或多個)的細節(像ID的用戶控件提到的)也extension.config?是否需要在
<ext:command> ---- </ext:command>
或任何其他地方添加。usercontrol創建的,我只是隨同extension.config,.js和引用到我的extension.config文件中的ascx。我是否需要將我的用戶控件放在任何其他文件夾中?
你真的需要問的問題1?如果您從extension.config中刪除了詳細信息並且它不起作用,那麼顯然它們是必需的。 – 2012-08-11 11:57:09
我試圖放置即使像' ButtonId '擴展名,但它說無效的子元素命令。我需要準確放置的位置? –
pavan
2012-08-11 12:12:56
你檢查過配置的模式嗎? http://stackoverflow.com/questions/11897745/where-can-i-find-the-schema-for-the-sdl-tridion-ui-extensions-configuration-file – 2012-08-11 13:28:01