login status control templating broken

Posted by Community Admin on 04-Aug-2018 17:36

login status control templating broken

All Replies

Posted by Community Admin on 17-Nov-2014 00:00

It is impossible to set the template layout for the login status control. This is caused by code that doesn't do what the developer who wrote it thought it did.

        public override string LayoutTemplatePath
       
            get
           
                if (!this.IsLoggedIn)
               
                    return this.LoggedOutLayoutTemplatePath;
               
                return this.LoggedInLayoutTemplatePath;
           
            set
           
           
       

        public virtual string LoggedOutLayoutTemplatePath
       
            get
           
                return ControlUtilities.ToVppPath("Telerik.Sitefinity.Resources.Templates.PublicControls.LoginStatus_LoggedOut.ascx");
           
            set
           
                base.LayoutTemplatePath = value;
           
       

This obviously doesn't work.

Posted by Community Admin on 20-Nov-2014 00:00

Hello Justin,

You are correct - removing the template this way or adding a value for the template path in the designer will not alter the actual output of the widget and will revert all settings. This is due to the implementation of the Login Status control. In the past we had some problems with the control getting cached and displaying a wrong template. Therefore we added cache substitution for it so it no longer uses a default template, but constructs one. Details on both the implementation of the control and ways to change its layout can be found in my colleague Boyan's answer to this forum thread

Regards,
Ivan D. Dimitrov
Telerik

 
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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 20-Nov-2014 00:00

And you decided a thread on a forum was the best place to document this?

Posted by Community Admin on 25-Nov-2014 00:00

Hi Justin,

You are correct - we do not have documentation on methods for extending every control within Sitefinity. Also I could not find any such request to our Documentation Portal. Feel free to log one if need be. For the time being, you can always post issues encountered while extending our default widgets in our forums or through a support ticket. We will gladly answer any questions you may have.

Regards,
Ivan D. Dimitrov
Telerik

 
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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed