Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity: Sitefinity SDK > Login Status widget with external widget templates

Login Status widget with external widget templates

  • Nelson avatar

    Posted on Jul 1, 2011 (permalink)

    It seems that it is not possible to change the LoggedInLayoutTemplatePath and LoggedOutLayoutTemplatePath properties of the LoginStatus widget. Is this a bug?

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jul 4, 2011 (permalink)

    Hello Nelson,

    Yes, there is a know issue about the template paths of the control. I suggest that you should use the standard ASP.NET analogs in a custom or user controls as a workaround.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

    Reply

  • Ian avatar

    Posted on Oct 5, 2011 (permalink)

    Is there any progress on resolving this?  Thanks

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Oct 6, 2011 (permalink)

    Hi Ian,

    The status of the issue is not fixed.  There is a workaround that I see if you override
    LoggedInLayoutTemplatePath and LoggedOutLayoutTemplatePath, but changing the properties though the control designer does not work.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Ben avatar

    Posted on Nov 17, 2011 (permalink)

    Can you go into a bit more depth explaining the work around?

    Thanks!

    -Ben

    Reply

  • SteveV Intermediate avatar

    Posted on Dec 1, 2011 (permalink)

    @Ivan:

    Per your last post: "There is a workaround that I see if you override
    LoggedInLayoutTemplatePath and LoggedOutLayoutTemplatePath, but changing the properties though the control designer does not work."

    The "LoggedInLayoutTemplatePath" and "LoggedInLayoutTemplatePath" values aren't persisted when edited via the designer.  Any info on the work around would be appreciated.

    Thanks--Steve

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Dec 6, 2011 (permalink)

    Hi Stevev,

    You have to inherit from LoginStatusControl and override the virtual LoggedInLayoutTemplatePath and LoggedOutLayoutTemplatePath public properties.



    Regards,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Elsane avatar

    Posted on Feb 7, 2012 (permalink)

    I've tried to do this but my solution doesn't work. Can you give me an example ?

    Thanks

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Feb 8, 2012 (permalink)

    Hi,

    Here is a sample code

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Sitefinity.Web.UI.PublicControls;
     
    namespace SitefinityWebApp
    {
        public class LoginStatusControlSample : LoginStatusControl
        {
     
            protected override string LoggedInLayoutTemplateName
            {
                get
                {
                    return null;
                }
     
            }
     
            protected override string LoggetOutLayoutTemplateName
            {
                get
                {
                    return null;
                }
            }
     
     
            public override string LoggedInLayoutTemplatePath
            {
                get
                {
                    return "~/MyPRefix/Telerik.Sitefinity.Samples.Resources.LoggedInLayoutTemplatePath.ascx";// here return your template using Virtual Path provider
                }
     
            }
     
            public override string LoggedOutLayoutTemplatePath
            {
                get
                {
                    return "~/MyPRefix/Telerik.Sitefinity.Samples.Resources.LoggedOutLayoutTemplatePath.ascx";";//here return your template using Virtual Path provider
                }
     
            }
           
        }
    }


    http://www.sitefinity.com/blogs/slavoingilizov/posts/11-04-18/taking_advantage_of_the_virtual_path_provider_in_sitefinity_4_1.aspx

    Regards,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity: Sitefinity SDK > Login Status widget with external widget templates