More in this section

Forums / General Discussions / Standart login customizing

Standart login customizing

6 posts, 0 answered
  1. Vyacheslav
    Vyacheslav avatar
    11 posts
    Registered:
    18 Nov 2010
    13 Jul 2011
    Link to this post
    I am trying to customize a standart login page. I've overrided the control template for Telerik.Sitefinity.Security.Web.UI.LoginForm control at Administration->Settings->ViewMap configuration section. But I can't add my stylesheet file in this template. I've try to add ResourceFile in ResourceLinks control like this:
        <sitefinity:ResourceFile Name="Sitefinity/WebsiteTemplates/Homesite/App_Themes/Homesite/css/Login.css" />

    but it isn't working. The css file can be received by this link in browser "~/Sitefinity/WebsiteTemplates/Homesite/App_Themes/Homesite/css/Login.css"

    Also I've tried to ovveride OnInit and add this styleshit file from code like this:

    <script runat="server">
        protected override void OnInit(EventArgs e)
        {
            HtmlHead head = (HtmlHead)Page.Header;
            HtmlLink link = new HtmlLink();
            link.Attributes.Add("href", "/Sitefinity/WebsiteTemplates/Homesite/App_Themes/Homesite/css/Login.css");
            link.Attributes.Add("type", "text/css");
            link.Attributes.Add("rel", "stylesheet");
            head.Controls.Add(link);
     
            base.OnInit(e);
        }
    </script>

    but I'm failed again. What am I doing wrong?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 Jul 2011
    Link to this post
    Hi Vyacheslav,

    If you add the style tags directly into the template do you get the styles applied? Can you check whether your styles are not overridden somehow and you need to use css properties like !important?

    Best wishes,
    Ivan Dimitrov
    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. Vyacheslav
    Vyacheslav avatar
    11 posts
    Registered:
    18 Nov 2010
    14 Jul 2011
    Link to this post
    Hi, Ivan 

    I've tried to add the css style directly into template like this:
    <style type="text/css">
         .login-popup-m
         {
             color:Red;
         }
     </style>

    This style was applied to the test div I added. 

    Styles in Login.css are specific, also Firebug shows me that there wasn't overrided styles. I've noticed that the Login conrol template doesn't contains any css style links but they are present on a login page. Does it means that these links were added to the login page instead of adding in control template? Is it possible to add link to my file in this way?
  4. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    18 Jul 2011
    Link to this post
    Hello Vyacheslav,

    You can try with

    <link rel="stylesheet" type="text/css" href="~/Sitefinity/WebsiteTemplates/Homesite/App_Themes/Homesite/css/Login.css">


    All the best,
    Jordan
    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
  5. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    04 Oct 2011
    Link to this post
    Hi,

    I want to change the branding/styles of the admin login page. I havent had any luck doing that so far. Could someone please share some info if you know how to achieve this? I want to change the header banner (black bar), and want to change the background bamboo image of the login control.

    Thanks,
    Duneel
  6. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    07 Oct 2011
    Link to this post
    Hello Duneel,

     
    This can be achieved only with backend theme. You can download the Sitefinity SDK - in the Education starter the login page is customized and there isn't any difference between the front-end and back-end customization.

    Best wishes,
    Jordan
    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
6 posts, 0 answered