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

Forums / Developing with Sitefinity / How to remove "dash to" buttons!

How to remove "dash to" buttons!

4 posts, 0 answered
  1. Bo Sep
    Bo Sep avatar
    21 posts
    Registered:
    27 May 2010
    23 Feb 2011
    Link to this post
    Hi there,
    What file do I have to look into in order to remove any of the "Dash To" buttons on the right side of the Sitefinity SP4 Dashboard? I don't want to remove the entire link group which can be commented in the default.aspx page in the Admin folder. I believe this is automatically done when a module is created.
    Thank you for your help.
  2. Bo Sep
    Bo Sep avatar
    21 posts
    Registered:
    27 May 2010
    24 Feb 2011
    Link to this post
    No One Knows???
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    28 Feb 2011
    Link to this post
    Hi Bo Sep,

    The buttons are added by a Repeater control

    <asp:Repeater ID="repeaterModules" runat="server">
                        <ItemTemplate>
                            <li>
                                <a href='Modules.aspx?module=<%# Eval("Name") %>&Param=insert'
                                   class="CmsButLeft new">
                                   <strong class="CmsButRight light">
                                       <asp:Literal ID="Literal3" runat="server" Text="<%$Resources:Create %>"></asp:Literal>
                                       <%--<%# (Eval("Title").ToString() != "Generic Content" && Eval("Title").ToString() != "News") ? Eval("Title").ToString().Remove(Eval("Title").ToString().Length - 1).ToLower() : Eval("Title").ToString().ToLower()%>--%>
                                       <%# (Eval("Title").ToString() == "Polls" || Eval("Title").ToString() == "Lists") ? ("a ").ToString() + Eval("Title").ToString().Remove(Eval("Title").ToString().Length - 1).ToLower() : (Eval("Title").ToString() == "Events") ? ("an ").ToString() + Eval("Title").ToString().Remove(Eval("Title").ToString().Length - 1).ToLower() : (Eval("Title").ToString() == "News") ? ("a news item ").ToString() : Eval("Title").ToString().ToLower() %>
                                   </strong>
                                </a>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>

    which is bound on the server inside ~/Sitefinity/Admin/Default.aspx.cs

    List<IWebModule> webModules = new List<IWebModule>();
    foreach (IWebModule module in ModuleManager.GetWebModulesValues())
    {
        if (module is SecuredModule && ((SecuredModule)module).CanCreate())
            webModules.Add(module);
    }
     
    if (webModules.Count > 0)
    {
        repeaterModules.DataSource = webModules;
        repeaterModules.DataBind();
    }
    else if (webModules.Count == 0 && !createPageLink.Visible && !addUserLink.Visible)
    {
        dashToLiteral.Visible = false;
    }


    All the best,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  4. Bo Sep
    Bo Sep avatar
    21 posts
    Registered:
    27 May 2010
    01 Mar 2011
    Link to this post
    Thank you Ivan.

Register for webinar
4 posts, 0 answered