More in this section

Forums / General Discussions / Content Block Media Manager

Content Block Media Manager

3 posts, 0 answered
  1. AmrElsayed
    AmrElsayed avatar
    87 posts
    18 Jul 2012
    12 Sep 2011
    Link to this post

    We need to extend the Media Manager dialog by adding an extra function that would impact the html that is generated in the content block, we would like to create something like the resizing radio buttons options (please review MediaManager.png), we need to get the media manager dialog currently used in Sitefinity, I know that the editor dialogs are downloaded with the SDK in [Telerik Downloaded Path]\RadControls for ASP.NET AJAX Q2 2011\EditorDialogs but I think Sitefinity content blocks use another media manager dialog template as we can't seem to find all the html/javascript that makes up the control.

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    15 Sep 2011
    Link to this post
    Hello Amrelsayed,

    Create a template for the MediaManager dialog in your site root.
    The template is:
    <%@ Control Language="C#"%>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.ItemLists" TagPrefix="sf" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sfFields" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Libraries.Web.UI.Designers" TagPrefix="sfViews" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Libraries.Web.UI.Designers" TagPrefix="sfDesigners" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.ControlDesign" TagPrefix="sf" %>
     <telerik:RadWindowManager runat="server" ID="test"></telerik:RadWindowManager>
    <sf:ResourceLinks ID="resourcesLinks" runat="server">
        <sf:ResourceFile JavaScriptLibrary="JQuery" />
        <sf:ResourceFile Name="Styles/ListBox.css" />
    <div class="sfSmallLargeColsDim">
        <div class="sfClearfix sfColWrapper">
                BinderBoxLabelText="<%$ Resources:Labels, NarrowByTyping %>" />
            <div class="sfLeftCol">
                <telerik:RadListBox runat="server" ID="libraryListBox" Skin="Sitefinity" Height="350" Width="125" ></telerik:RadListBox>
                <sf:RadListBoxBinder id="libraryBinder"
                    DataMembers="Id, Title">
                        <sf:BinderContainer ID="BinderContainer1" runat="server" RenderContainer="true">
            <div class="sfUploadedItemWrp sfRightCol">
                <sf:ItemsList ID="mediaContentItemsList"
                    ConstantFilter="Visible == true AND Status == Live"
                        <sf:ItemDescription Name="ItemDescription1"></sf:ItemDescription>               
        <sfDesigners:ResizingOptionsControl id="resizingOptionsControl" runat="server" />
        Test Test <%--Here is test to see if you have sucessfuly mapped the template--%>
    <script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        function OnClientClose(sender, eventArgs) {
            if (eventArgs.get_argument() != "undefined") {
                if (eventArgs.get_argument()._commandArgument != null) {
    //            _argument is where the html string generated is created and written to RadEditor
                    var media = "x-mplayer2";
                    var silverlight = "application/x-silverlight-app";
                    var replace = eventArgs._argument._commandArgument.toString();
                    //provide logic that will manipulate the html
                    eventArgs._argument._commandArgument= replace;
        var oWindow = GetRadWindow();
        if (oWindow)

    To map the template go to Administration->Settings->Advanced->Controls->ViewMap
    HostType: Telerik.Sitefinity.Modules.Libraries.Web.UI.Designers.MediaContentSelectorView

    Debugging in with Firebug you can see how the string is stored in _argument. You need to modify eventArgs._argument._commandArgument in the OnClientClose event.

    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. AmrElsayed
    AmrElsayed avatar
    87 posts
    18 Jul 2012
    18 Oct 2011
    Link to this post
    Thanks Radoslav, it is working properly.
3 posts, 0 answered