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

Custom tools

5 posts, 1 answered
  1. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    21 May 2010
    Link to this post
    Hi,

    I am new to SiteFinity development and have created a tool to automatically create a page with some default settings and default content based on criteria inputted by the user. This seems to be working well but I am concerned by the fact that the "Tools" area seems slightly hidden away from users in the Administration section.

    Is there any way to display a tool or set of tools in a more obvious location, or is there something other than a tool that I should be using? I know I can set Tools to display as the start page.

    I wonder if it's possible to extend or modify the "Dash To:" list on the right hand side of the Dashboard...
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    21 May 2010
    Link to this post
    Hello Chris,

    Create a tab in the MainMenu that will navigate to your tool. Please take a look at the attached screenshot.

    You should modify Sitefinity\Admin\Admin.master.cs as the code below shows

    protected void MainMenu_DataBound(object sender, EventArgs e)
    {
     
        RadTab myToolTab = new RadTab("Create a page", "CreatePage");
        myToolTab.NavigateUrl = "~/path to your tool";
        MainMenu.Tabs.Add(myToolTab);
     
        CmsManager manager = new CmsManager();
        PagePermission pagePerm = new PagePermission(manager.GetRootPage(), PageRights.View);
     
     
      
        if (!String.IsNullOrEmpty(this.currentTab))
            SetCurrentTab(this.MainMenu.Tabs, this.currentTab);
    }


    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
  3. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    24 May 2010
    Link to this post
    Thanks Ivan. I also found that I could add to the 'Dash To:' menu in Default.aspx which looks very handy...

    <ul>
                    <li>
                        <!-- Custom Link -->
                    </li>
                    <li runat="server" id="createPageLink">
                        <asp:HyperLink ID="linkNewPage" runat="server" NavigateUrl="~/Sitefinity/Admin/Pages.aspx?mode=new" CssClass="CmsButLeft new">
                            <strong class="CmsButRight light"><asp:Literal runat="server" Text="<%$Resources:CreateAPage %>"></asp:Literal></strong>
                        </asp:HyperLink>
                    </li>
                    <li runat="server" id="addUserLink">
                        <asp:HyperLink ID="linkNewUser" runat="server" NavigateUrl="~/Sitefinity/Admin/CmsAdmin/Users.aspx?mode=new" CssClass="CmsButLeft new">
                            <strong class="CmsButRight light"><asp:Literal runat="server" Text="<%$Resources:AddAUser %>"></asp:Literal></strong>
                        </asp:HyperLink>
                    </li>
                    <asp:Repeater ID="repeaterModules" runat="server">
                        <ItemTemplate>
                            <!-- SiteFinity code -->
                        </ItemTemplate>
                    </asp:Repeater>
                </ul>

  4. Chris Mills
    Chris Mills avatar
    1 posts
    Registered:
    13 May 2010
    26 Jun 2010
    Link to this post
    Hi Ivan,
    I followed your instructions to modify Sitefinity\Admin\Admin.master.cs this works fine.
    The in /Sitefinity/Admin I created a web form and copied in the template and code from the Files.aspx and Files.aspx.cs
    I dropped out the Files controls and code, and then added a couple of buttons to the Form.
    It all works fine BUT I have no css styles on my form.( screen shot of plain white unstyled form attached)
    I'm sure I'm missing something simple, can you help me to get the style back?

    <%@ Page Title="" Language="C#" MasterPageFile="~/Sitefinity/Admin/Admin.master" AutoEventWireup="true" CodeFile="webconfgisecurity.aspx.cs" Inherits="Admin_webconfgisecurity" %>
      
    <%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
    <%@ Register Assembly="Telerik.FileManager" Namespace="Telerik.FileManager" TagPrefix="cc1" %>
    <%@ Register Assembly="Telerik.FileManager" Namespace="Telerik.FileManager.WebControls" TagPrefix="cc2" %>
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sfWeb" %>
      
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <div id="main">
            <div class="in">
                <div runat="server" id="mainPanel">
                <h2>Secure web.config</h2>
                    <asp:Button ID="Button1" runat="server" Text="Encrypt" />
                    <asp:Button ID="Button2" runat="server" Text="Decrypt" />
                </div>
                </div>
            </div>
      
        <div class="clear width"><!-- --></div>
    </asp:Content>
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
      
    using Telerik.Web.UI;
    using Telerik.FileManager;
    using Telerik.Cms.Web.UI;
    using Telerik.Cms.Web;
    using Telerik.Cms;
    using Telerik.Cms.Security;
      
      
    public partial class Admin_webconfgisecurity : AdminPage
    {
        public override string MenuItemName
        {
            get { return "wconfig"; }
        }
      
        public override int RightsRequired
        {
            get
            {
                return GlobalRights.ManageFiles;
            }
        }
      
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string path = Request.QueryString.Get("path");
                path = HttpUtility.UrlDecode(path);
                if (!String.IsNullOrEmpty(path))
                {
                      
                }
            }
        }
    }

    Regards
    Chris Mills
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Jun 2010
    Link to this post
    Hello Chris Mills,

    Under /Sitefinity/Admin/Themes/Default/ you need to create a  stylesheet ( css) called wconfig.css. The css name should be the same as the value you return under MenuItemName. In this stylesheet you need to defind the css classes that will be used to style you page. You can reuse some of the css clases from the other pages like /Sitefinity/Admin/Themes/Default/pages.css and add import rules at the beginning of your stylesheet.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
5 posts, 1 answered