Module Title Tag

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
6/2/2014 3:05:43 AM
Nik
Gravatar
Total Posts 36
mojoportal.net.ua - Russian community of mojoportal

Module Title Tag

Good day.

Version mojoPortal 2.4.0.3

I have a problem. I needed to change module title tag from h2 to h1. I completed all items of article https://www.mojoportal.com/how-to-control-headings.aspx

  •  Add to user.config
    <add key="EnableEditingModuleTitleElement" value="true" />
    <add key="ModuleTitleTag" value="h1" />
  • running a sql query:
    UPDATE mp_Modules
    SET HeadElement = 'h1'

In option of features I saw that all right (The elements of html title were h1). But when I viewed source - it was still h2.

In file theme.skin I found next string:

<portal:ModuleTitleControl runat="server" 
...
    Element="h2"

When I changed h2 to h1 (in this string) - all of my module title tags were changed.

But I need that module title tag will be customizable.

What should I do from this?

 

6/2/2014 6:56:29 AM
Gravatar
Total Posts 18444

Re: Module Title Tag

Hi,

In theme.skin you can control headings in a way that overrides the module settings.

<portal:ModuleTitleControl runat="server"
    UseModuleHeading="false"
    UseModuleHeadingOnSideColumns="false"
    DetectSideColumn="true"
    Element="h1"
    SideColumnElement="h2"
    LiteralExtraTopContent=""
    LiteralExtraBottomContent=""
    ExtraCssClasses=""
    SideColumnExtraCssClasses=""
    />

The key here is UseModuleHeading="false" which means it will use the theme.skin settings instead of the module settings or web.config setting. If that was set to true then what you did should work but with false it will use the other settings from theme.skin for Element and SideColumnElement. Note for example in the above case it will use h1 for center pane content and h2 for side content.

Hope that helps,

Joe

6/2/2014 9:46:14 AM
Nik
Gravatar
Total Posts 36
mojoportal.net.ua - Russian community of mojoportal

Re: Module Title Tag

Thanks.

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