• Client login
  • Work for us

All the latest from the team...

Thursday, 6 March 2008

Adding a logout link to the control panel in DNN

DotNetNuke is a great tool but because it's written by developers sometimes basic GUI options have been omitted. One of these is adding a logout button the control panel - especially if you don't want a login/out link on your main webpages!

It's actually really simple to do this just navigate to the "admin/ControlPanel" directory of your site.

There are two different control panels: "iconbar" and "classic" just open up the Web Control that represents the one you are using: classic.ascx or iconbar.ascx.

Next you'll need to register the DNN:Login tag and associate it with the "Login" Control. To do this add the following line under the control declaration so your file will look like this:

<%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.ControlPanels.IconBar" CodeFile="IconBar.ascx.vb" %>
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>

Then to add the link itself just add the line:
<dnn:login runat="server" id="dnnLOGIN">

...Wherever you would like the link displayed... Simple!

Here's an example file for you to download: iconbar.zip

Labels: , , , ,

3 Comments:

Anonymous Ben said...

Looks great, but fails :-(

Example download is missing?
pity.

April 29, 2008 1:33 PM  
Blogger Jon said...

Hi Ben, The example is now back up - email me if you have any problems at jon@codrequired.com

Good luck!
Jon

April 29, 2008 1:45 PM  
Anonymous Steven said...

very handy thanks.

September 09, 2008 8:28 AM  

Post a Comment

<< Home

RSS feed ATOM feed Add to Technorati Favorites View Jon Harvey's profile on LinkedIn