Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...dynamcially generated title tagsdynamcially generated title tags
Previous
 
Next
New Post
7/28/2009 3:02 AM
 

My module:

        protected void Page_Init(object sender, EventArgs e)
        {
            PortalSettings.ActiveTab.Title = "foo bar";
        }

My page source:

<title>
	View Talk
</title>

View Talk is the page title set by the admin I want to override.  This didn't work.  What did I do wrong?

This does do this in the page title bar:

<h2 id="pagetitle">foo bar</h2>

But I would rather it not.  I just want to set the <title> tag for SEO.  On DNN5.1.
AldenG
 
New Post
7/28/2009 6:04 PM
 

Ok, sorry, I misread.

Not a skinning issue BTW (your more likely to get an answer in the extend it forum)

 
New Post
7/28/2009 8:17 PM
 

Maybe this will help...

DotNetNuke.Framework.CDefault oCDefault = (DotNetNuke.Framework.CDefault)this.Page;
if(oCDefault != null)
{
oCDefault.Title "Your New Title";
}

 
New Post
7/29/2009 4:49 AM
 

You do realize that you don't need to program anything or add any code or do anything other than just edit the page settings, right?  It's fairly simple.  Page Name is what appears in the menu and Page Title is what appears in the <title> tags.  Setting this in the page settings overrides the default admin settings for page title.  If you don't set Page Title in the page settings, then the Page Name is used I think along with the website name from the admin settings.  The Page Name and Page Title don't have to be the same thing, so you can have a longer page title for the <title> in the <header>, but a shorter name for the menu to avoid a page name that is just too verbose to fit nicely in the menu.

Not sure why anyone would recommend special code unless I'm missing the point.  If you are actually trying to have the page name randomly change by dynamically generated text each time the page is entered, well, I would think that would cause more issues with SEO than actually help, unless randomly changing page names are something the search engines like now.  I think frequently updated content would be better and a lot less apt to be harmful to your ratings.  If your content is so changing and different each time you post that a new page title is in order, then you're likely better off from an SEO standpoint adding a new page for this new and unique content.

There is also a third party module that does update the keywords tag to include words and phrases from the pages content, and something like that might be helpful to you.  I'm not sure if it works with DNN5, though, as I used it as a Pageblaster plugin and haven't gotten Pageblaster to behave with DNN5 yet.  I never saw any help from it, though it could be helpful.


JOHN GIESY
DotNetNuke Hosting Expert

DotNetNuke 7 Hosting $70 /year
DNN4Less.com Team DotNetNuke  

New Post
7/29/2009 4:51 AM
 

Oh, also note that by default, upon installation of a new portal, the Home page is not assigned a Page Title in the page settings, it is normally blank and defaults to the Page Name plus website name from admin settings combo.  I've not looked to see how the search pages are setup.


JOHN GIESY
DotNetNuke Hosting Expert

DotNetNuke 7 Hosting $70 /year
DNN4Less.com Team DotNetNuke  

Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...dynamcially generated title tagsdynamcially generated title tags


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out