1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Command Panel customisation

Command Panel customisation

6 posts, 0 answered
  1. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    08 May 2009
    Link to this post

    Hi all

    In our application we have three types of tags called
     industries, services, documents

    I differentiated these by adding a prefix before each tag name.

    On the admin side when want to manage the tags ,I want to show all the tags

    classified as Servises,Industries,Documents.

    So that the command panel shoud contain three commads for these links.

    The control panel should be able to display the corresponding tags.

    I have code with me how to categorize and differentiate the tags.

    I dont know how to create the commad panel and control panel for this.

    I have read all the documents provided in the blog

    http://blogs.sitefinity.com/Ivan/Posts/09-02-18/Sitefinity_3_6_new_backend_architecture_-_documentation_outline.aspx

    but did not find the correct solution.

    I tried various methods like loading from user control, custom control auto generating commands etc.

    I am not able to stop the default panels loading .

    I called the base class constructor with parameter false.

    Even the default control template is rendering.

    Any one please help me,I am searching for this more than a week.

    Thanks
    Venkat.
  2. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    09 May 2009
    Link to this post
    Hello Venkat,

    First of all, are you making a module of your own, or are you trying to replace a view in ControlsConfig? Did you take a look at the sample modules?

    If you are developing a custom module, it will be best if you sent us the code for analysis. We wil determine your problem and return a working version.

    If, however, you are customizing an existing view in some of the modules, the most probable culprit is ControlsConfig. Sending it plus your code will most like be enough for us to solve this problem for you.

    As a suggestion - you can always ask us if you have a lot of trouble. If you provide some feedback on what was confusing, or what you find difficult and think can be improved, we would be grateful. Suggestions for the documentation will be greatly appreciated as well!

    Kind regards,
    Dido
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    11 May 2009
    Link to this post


    Thank you for you reply.


    I have created three usercontrols called Industry Editor,Servise Editor and Documemnt Editor to add the tags to the  blog post.

    I did this by adding a prefix to the tag.

    The functionality is same as TagEditor.

    so here I have three tag editor user controls on the create a new post page.

    The user adds his industries servises and documents to the post as he adds tags to the post.

    as I m storing all industries ,servises documents in the tagss table.

    all are shring the same table but the difference is tags that are belogs to service are prefixed with SSRRVV.
    if the tag is Service1
    it is stored in the db as SSRRVVService1.

    but while showing it on the screen I explicity removing the prefix and showing it.

    Here ymy problem is ,to manage these tags at one place.

    We have a commad panel for Tags,Categories,and comments in the blogs section.

    I want to customize it to show the tags as Servises Industries,Documents.

    But it is showing the prefixes also and showing all of them as Tags.

    I want to customize this section using commad panel and control panel

    The command panel contains three commads as industries servises and documents.

    The control panel should be able to show the tags that are relevent to the servises industries and documents.

    This is my need .I used no custom modules .I just replaced the exsting TagEditor with my usercontrols to  add the tags to the page.

    I want to manage the tags in the tags section. Here tags are no more tags , they are industries, servises , documents. but all using the same table in the DB with corresponding prefixes.

    thanks Venkat

  4. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    11 May 2009
    Link to this post
    Hi Venkat,

    For every module that implements tags, you should override its TagsView`1 template. This is the view that shows tags. If I understood correctly, this is what you wanted to do.

    You could add a code-behind and shape-up the markup to better suit your needs if you want to.

    Here is a list of all tag views:

    <!--Provides user interface for managing tags in the Generic Content module.--> 
    <viewSettings 
       hostType="Telerik.Cms.Engine.WebControls.Admin.TagsView`1[[Telerik.Cms.Engine.WebControls.Admin.GenericControlPanel, Telerik.Cms.Engine]]"  
       layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Generic_Content/TagsView.ascx"  
    /> 
    <!--Provides user interface for managing tags in the News module.--> 
    <viewSettings  
       hostType="Telerik.News.WebControls.Admin.NewsTagsView" 
       layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/TagsView.ascx"  
    /> 
    <!--Provides user interface for managing tags in the blogs module.--> 
    <viewSettings  
       hostType="Telerik.Blogs.WebControls.Admin.BlogTagsView" 
       layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Blogs/TagsView.ascx"  
    /> 
    <!--Displays tags for Images & Documents.--> 
    <viewSettings  
       hostType="Telerik.Libraries.WebControls.Admin.TagsView" 
       layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/TagsView.ascx"  
    /> 
    <!--Displays all tags for the Events module--> 
    <viewSettings  
       hostType="Telerik.Events.WebControls.Admin.TagsView"  
       layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/TagsView.ascx"  
    /> 


    Regards,
    Dido
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    12 May 2009
    Link to this post
    Thank you for your reply.

    It is working fine.

    I have one more question..

    I want to rename

    the commands on the left side

    Posts
    Comments
    Categories
    Tags

    to
    Posts
    No comments are shown (i want to hide this command)
    Industries & Services
    Documents

    Please note that I want to change the names only. not the links that are pointed by these commands.

    Can you please give me suggestions.

    Thanks
    Venkat
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 May 2009
    Link to this post
    Hello Venkat,

    "I want to rename the commands on the left side
    "

    These commands are manually generated. To change the names you should do the following.

    1.Create your ControlPanel that inherits from BlogsControlPanel, override Name property and return "BlogsControlPanel". Then override CreateStandardCommandPanels method. In this method change the title or other parameters.

    2. Create a new module that inherits BlogsModule and override CreateControlPanel method - then return your control panel there.

    Sample code:

    Below is the custom control panel:
    Here we are changing only the titles.

    using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Web; 
    using Telerik.Blogs.WebControls.Admin; 
    using Telerik.Framework.Web; 
     
    /// <summary> 
    /// Summary description for BlogsModuleControlPanel 
    /// </summary> 
    public class BlogsModuleControlPanel : BlogsControlPanel 
        public BlogsModuleControlPanel() 
        { 
        } 
        public override string Name 
        { 
            get 
            { 
                return "BlogsControlPanel"
            } 
            set 
            { 
                base.Name = value; 
            } 
        } 
     
        protected override void CreateStandardCommandPanels(string viewMode, List<Telerik.Cms.Web.UI.Backend.CommandItem> commandsInfo, List<Telerik.Web.ICommandPanel> list) 
        { 
            list.Clear(); 
     
            switch (viewMode) 
            { 
                case "BlogsView"
                case "BlogsPermissionsView"
                    Telerik.Cms.Web.UI.Backend.CommandPanel blogsCommandPanel = new Telerik.Cms.Web.UI.Backend.CommandPanel(); 
                    blogsCommandPanel.Title = "ExploreBlogsMogule"
                    blogsCommandPanel.AddCommand("BlogsView", ControlUtils.SliceRoute(GetControlPanelRoute(), this.Name), null"AllBlogs""AllBlogsDescription""all"); 
                    blogsCommandPanel.AddCommand("BlogsPermissionsView", ControlUtils.SliceRoute(GetControlPanelRoute(), this.Name), null"Permissions""PermissionsDescription""globalPerm"); 
                    list.Add(blogsCommandPanel); 
                    break
                default
                    // helper command panel  
                    Telerik.Cms.Web.UI.Backend.CommandPanel helperCommandPanel = new Telerik.Cms.Web.UI.Backend.CommandPanel(); 
                    helperCommandPanel.AddCommand("BlogsView""BlogsControlPanel"nullnull"AllBlogs"null"backWrapp"); 
                    list.Add(helperCommandPanel); 
                    // posts command panel  
                    Telerik.Cms.Web.UI.Backend.CommandPanel postsCommandPanel = new Telerik.Cms.Web.UI.Backend.CommandPanel(); 
                    postsCommandPanel.Title = "ExploreThisBlog"
                    postsCommandPanel.AddCommand("PostsView", ControlUtils.SliceRoute(GetControlPanelRoute(), this.Name), nullthis.ParentId.ToString(), null"PostsCustom"null"all"); 
                    if (this.Manager.Provider.AllowComments) 
                        postsCommandPanel.AddCommand("BlogCommentsView", ControlUtils.SliceRoute(GetControlPanelRoute(), this.Name), nullthis.ParentId.ToString(), null"CommentsCustom"null"all"); 
                    postsCommandPanel.AddCommand("BlogCategoriesView", ControlUtils.SliceRoute(GetControlPanelRoute(), this.Name), nullthis.ParentId.ToString(), null"CategoriesCustom"null"all"); 
                    postsCommandPanel.AddCommand("BlogTagsView", ControlUtils.SliceRoute(GetControlPanelRoute(), this.Name), nullthis.ParentId.ToString(), null"Tags"null"all"); 
                    list.Add(postsCommandPanel); 
                    // blog settings command panel  
                    Telerik.Cms.Web.UI.Backend.CommandPanel blogSettingsPanel = new Telerik.Cms.Web.UI.Backend.CommandPanel(); 
                    blogSettingsPanel.Title = "BlogSettingsTitle"
                    blogSettingsPanel.AddCommand("BlogsSettingsView""BlogsControlPanel.BlogSettingsView"nullthis.ParentId.ToString(), "BlogSettingsTitle"null"settings"); 
                    list.Add(blogSettingsPanel); 
                    break
     
                    
            }  
     
        } 
        private List<string> GetControlPanelRoute() 
        { 
            List<string> controlPanelRoute = ControlUtils.ParseRoute(ControlUtils.GetCurrentRoute()); 
            if (controlPanelRoute.Count == 0) 
                controlPanelRoute.Add(this.Name); 
            return controlPanelRoute; 
        }  
     

    Here we are creating a new module returning our control panel.

    using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Web; 
    using Telerik.Blogs; 
     
    /// <summary> 
    /// Summary description for CusomBlogsModule 
    /// </summary> 
    public class CusomBlogsModule : BlogsModule 
        public CusomBlogsModule() 
        { 
        } 
     
        public override System.Web.UI.Control CreateControlPanel(System.Web.UI.TemplateControl parent) 
        { 
            return new BlogsModuleControlPanel(); 
        } 
     

    3. Remove the default Blogs module from your web.config file (<modules> section ) and add the newly created.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
6 posts, 0 answered