log in, lost

Topics: Controls, Themes
Jul 27, 2010 at 10:49 PM

I am learning how to work with BlogEngine. So far, I like it. I try to incorporate the BlogEngine in my actual Master Page of my website using Iframe. I find out that the best way to do it is with the Theme: "Mobile" that we have the best rendering.

When I did that I realize that the LOG IN disappears. I don't know, from there how to get back to my control panel!

Is any body have a answer

 

Thanks

Coordinator
Jul 28, 2010 at 8:33 AM

It looks like the Mobile theme doesn't display a Login link (for some reason).  You can easily add one though.  In the themes\Mobile folder, you will want to edit 2 files -- site.master and site.master.cs.  The edit to site.master will be to add the link (shown highlighted):

<div id="menu">
  <a href="<%=Utils.RelativeWebRoot%>default.aspx">Home</a> |
  <a href="<%=Utils.RelativeWebRoot%>archive.aspx">Archive</a> |
  <a href="<%=Utils.RelativeWebRoot%>contact.aspx">Contact</a> |
  <a runat="server" id="aLogin" /> |
  <a href="<%=Utils.FeedUrl %>">Feed</a> 
</div>

In the site.master.cs file, there's basically no code in there.  Add the following code into the existing Page_Load() handler.

protected void Page_Load(object sender, EventArgs e)
{   
	if (Page.User.Identity.IsAuthenticated)
	{
		aLogin.InnerText = Resources.labels.logoff;
		aLogin.HRef = BlogEngine.Core.Utils.RelativeWebRoot + "login.aspx?logoff";
	}
	else
	{
		aLogin.HRef = BlogEngine.Core.Utils.RelativeWebRoot + "login.aspx";
		aLogin.InnerText = Resources.labels.login;
	}
}

 

Jul 28, 2010 at 1:58 PM
Although this wouldn't work in an IFrame, you can also always go to one of the admin pages, and if you're not logged in, BE will prompt you to log in; this is actually how I've implemented the "Admin" link in at least one of my themes.
Jul 28, 2010 at 5:04 PM
Edited Jul 28, 2010 at 5:05 PM

Thanks a lot Ben. I think that will do the trick.

 

Do you have any suggestion to integrate BlogEngine in my master page? When I use the theme:"standard" for example, the IFrame has a horizontal scroll bar because of the width of the space available, which is about 750 px. The scroll bar make it very annoying. I like BlogEngine, so I want to try to integrate it into my website. I would like to shrink it into the space available.

Also, when I click on RSS Feed link of the horiz menu, the link doesn't seam to work, the user get a page of HTML code.

Thanks for your great advise.

 

Eric