login status control templating broken
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.
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
And you decided a thread on a forum was the best place to document this?
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