Chris Hammond

Director of Training Programs for DotNetNuke Corporation

News

Thanks for visiting my blog, you can find more about me at ChrisHammond.com. I am the Director of Training Programs for DotNetNuke Corporation.

Cool Sites

My domains

Projects

DotNetNuke Tip: How to modify the page title with your module

This is actually a very simple trick to do inside of your modules, though you might need to setup an option to allow this to be turned on or off depending on what the site administrator wants the page title to be.

In C# you can use the following code

DotNetNuke.Framework.CDefault tp = (DotNetNuke.Framework.CDefault)this.Page;

tp.Title = "This is my page title";

So the next time you're coding a module and need to change the page title, it's that simple.

See you all at OpenForce07 in Vegas!

Comments

DotNetNuke Tip: How to modify the page title with your module - DotNetNuke Developer said:

Pingback from  DotNetNuke Tip: How to modify the page title with your module - DotNetNuke Developer

# October 4, 2007 12:11 PM

AJ said:

Awesome. This is why I chose to work with DotNetNuke. It's so extensible.

# October 4, 2007 8:38 PM

Adrienne said:

Exactly what i was looking for!

Here it is in VB:

Dim tp As DotNetNuke.Framework.CDefault = CType(Me.Page, DotNetNuke.Framework.CDefault)

tp.Title = "New Page Title"

# October 7, 2008 5:16 PM

Chris Reddick said:

Very Helpful Chris,

Thanks!

Similar for Keywords and Descriptions:

tp.Keywords = "Keywords go here"

tp.Description = "Description goes here"

# October 17, 2008 5:51 AM

almny said:

thanks

i want to ask if i can change contoner title for my costum module ?

# June 12, 2009 1:27 PM

Paul Chu said:

Nice tip, but also wanted to know just like Almy how to change / set the Container Title too ?

# March 28, 2010 11:08 PM

Echarben said:

Thank you so much, you saved me a ton of time.

# May 17, 2010 7:03 PM