How do i implement these?

Topics: ASP.NET 2.0
Mar 7, 2011 at 8:36 AM

I created a new page, and noticed that the page title isnt being set properly.

 

I will give an example.

This page http://www.muscletitans.com/archive.aspx has the title "Muscle Titans - Archive"

But this page http://www.muscletitans.com/clothing.aspx has the title "Muscle Titans" only. How do i set it to have the full title?

 

And also, is it possible to add images to blog posts from the outside? From the main page i mean, like the ones here:

http://www.geneticwar.com/

 

Thanks

Mar 7, 2011 at 3:56 PM

You didn't create this page in the admin area correct but rather as a new page outside BE but then integrated in correct?  If so, look in the code at the top of the page where the master page is refrenced and make sure you don't see 'title=""'.  If you do, remove it.  I had this same issue that that was the problem for me.

Mar 7, 2011 at 5:38 PM
guynethery wrote:

You didn't create this page in the admin area correct but rather as a new page outside BE but then integrated in correct?  If so, look in the code at the top of the page where the master page is refrenced and make sure you don't see 'title=""'.  If you do, remove it.  I had this same issue that that was the problem for me.

I did that but it still doesnt work.

Mar 7, 2011 at 6:28 PM

Using archive.aspx as the guide do you have the following in the code behind the clothing.aspx file?

 

 

 

public partial class archive : BlogEngine.Core.Web.Controls.BlogBasePage
{
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack && !IsCallback)
{
CreateMenu();
CreateArchive();
AddTotals();
}

//in this section you will replace Resources.Label.archive with something like "Clothing" or you can add a description to the resources file if you wish
Page.Title = Server.HtmlEncode(Resources.labels.archive);
base.AddMetaTag("description", Resources.labels.archive + " | " + BlogSettings.Instance.Name);
}

 

 

Mar 7, 2011 at 6:31 PM

also you will not need:

if (!IsPostBack && !IsCallback)
{
CreateMenu();
CreateArchive();
AddTotals();
}
Mar 9, 2011 at 6:34 PM

Couldnt figure out how to add it to the resource but i did it the manual way and it works :) Thanks dude :)

 

Maybe you can help me with this too?

 

http://blogengine.codeplex.com/discussions/245688

 

Thanks :)