Remove h1 and h2 tags on rendered page

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/3/2010 6:05:28 AM
Gravatar
Total Posts 8

Remove h1 and h2 tags on rendered page

Hello,

Forgive me if this has been posted before, however, it is very difficult to search through all the topics without a search function!

Ok, I need to remove the h1 tag from the Site Title tag and h2 tag from the Page Name tag from the rendered page.
However, in my markup there isn't anywhere where I can remove the h1 tags, as this is all I have...

"<portal:SiteTitle id="SiteTitle1" runat="server" UseLink="false"></portal:SiteTitle>"

When the page renders I see this, "<h1 class='siteheading'>Title of Site</h1>" - I need to remove the "h1" as I'd like to put this tag elsewhere, if I can! Likewise with the h2 tag on Page Name.

Please can anyone help?

Many thanks
Rick Lynch
 

 

2/3/2010 2:33:29 PM
Gravatar
Total Posts 18439

Re: Remove h1 and h2 tags on rendered page

Hi,

SiteTitle is a convenience control, if you don't like the markup it renders you can remove it and put actual html markup in its place.

There are no h2 tags at the page title level, they are actually at the content instance title level, coming from the html content feature or any other feature you put on a page. If you click the settings link next to the title of any content instance you can on the General tab uncheck show title and it will leave out the title completely allowing you to put it in the html content yourself as you like.

Also in the latest release 2.3.3.6 (released today) you can override that h2 and use another tag if you want, just paste this into your user.config file

<add key="ModuleTitleTag" value="h2" />

and change the tag to what you want to use.

Hope it helps,

Joe

2/6/2010 9:56:53 PM
Gravatar
Total Posts 211

Re: Remove h1 and h2 tags on rendered page

oh, this is great. For SEO purposes it hasn't been perfect that pages didn't have the H1 tag as the page title (basically module title). Most of us probably don't keep the H1 text based site name in the header.

I'll have to experiment with this and see if I can get module titles to be H1 tags, that would be ideal (I think).

2/8/2010 12:35:55 PM
Gravatar
Total Posts 190

Re: Remove h1 and h2 tags on rendered page

...without a search function?? I went to the search page (link up top there next to Site Map) and selected forums in the drop down, typed in "H1 Title" and this post was first in the list.

You must sign in to post in the forums. This thread is closed to new posts.