DotNetNuke Blog

Current Blog | | Search |

Overwriting Module and Page Title in DotNetNuke  By Jeff Smith
Wednesday, August 27, 2008 1:14 PM :: 582 Views :: 0 Comments :: Article Rating :: DotNetNuke, Search Engine Optimization, Modules Send A Message

There are many reasons one may want to dynamically change the module or page title in DotNetNuke. The modt common reason is for DNN search engine optimization. Here is a quick snippet of code for changing the titles in DotNetNuke. In this case, we have wrapped this ability with a module setting that enables or disables the functionality for a page or module:

 If CType(Settings("EnableTitleOverwrite"), String) = "1" Then
Me.ModuleConfiguration.ModuleTitle = Left(esIndex.IndexTitle, 255)
End If
If CType(Settings("EnableWindowTitleOverwrite"), String) = "1" Then
CType(Me.Page, CDefault).Title = Left(esIndex.IndexTitle, 255)
End If

 

Comments
Only registered users may post comments.
 Print   

 © 2007 - Venexus, Inc. - All rights reserved Terms Of Use | Privacy Statement