Module title not respecting Feature Instance Settings HTML Element For Title

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
11/13/2025 5:36:28 PM
Gravatar
Total Posts 546
feet planted firmly on the ground

Module title not respecting Feature Instance Settings HTML Element For Title

I want to control the heading element for HTML content modules, so I have added     <add key="EnableEditingModuleTitleElement" value="true" /> to my user.config.  I can now set HTML Element For Title to H1, H3 (etc), but it makes no difference to the resulting HTML - my title still comes out in an H2 element.

Editing the content itself doesn't change this.

I have a vague recollection of being told this needs a database script to be run if this is changed for pre-existing content, but if that's correct this seems like it really should not be needed. Can you advise how to make this work?

thanks!

11/13/2025 6:04:48 PM
Gravatar
Total Posts 2262

Re: Module title not respecting Feature Instance Settings HTML Element For Title

Hi Crispin,

It should respect the value you set. You're on 2.9.2, right?

Thanks,
Joe

11/14/2025 1:58:32 AM
Gravatar
Total Posts 546
feet planted firmly on the ground

Re: Module title not respecting Feature Instance Settings HTML Element For Title

Yes 2.9.2.1

It definitely doesn't respect the setting from the Feature Instance Settings, e.g.

"HTML Element For Title" set to H3

Results in this (logged in as an editor):

<h2 id="module66" class="page-header moduletitle">Safety Guidelines<span class="modulelinks"> <a title="Edit Settings For this Content Instance" class="ModuleEditLink" href="https://mysite.com/Admin/ModuleSettings.aspx?pageid=32&amp;mid=66">Settings</a> <a title="Edit" class="ModuleEditLink" href="https://mysite.com/HtmlEdit.aspx?pageid=32&amp;mid=66">Edit</a> <a href="#" id="mtogedit66" title="Toggle Inline Editing" class="jqtt inlineedittoggle ui-icon ui-icon-locked"></a></span></h2>

or this to anonymous user:

<h2 id="module66" class="page-header moduletitle">Safety Guidelines</h2>

11/15/2025 3:38:59 PM
Gravatar
Total Posts 546
feet planted firmly on the ground

Re: Module title not respecting Feature Instance Settings HTML Element For Title

Tested on another site - same result.

11/22/2025 6:33:33 AM
Gravatar
Total Posts 546
feet planted firmly on the ground

Re: Module title not respecting Feature Instance Settings HTML Element For Title

Any news on this issue?
It is definitely not working on any sites for me, unless I've made some configuration error somehow.

e.g. for my HTML content with ModuleID=8170, table [dbo].[mp_Modules]  has [HeadElement] = 'h1' 

Yet this is the rendered HTML:

<h2 id="module8170" class="page-header moduletitle">My Feature Instance Title<span class="modulelinks"> <a title="Edit Settings For this Content Instance" class="ModuleEditLink" href="https://mysite.com/Admin/ModuleSettings.aspx?pageid=5102&amp;mid=8170">Settings</a> <a title="Edit" class="ModuleEditLink" href="https://mysite.com/HtmlEdit.aspx?pageid=5102&amp;mid=8170">Edit</a> <a href="#" id="mtogedit8170" title="Toggle Inline Editing" class="jqtt inlineedittoggle ui-icon ui-icon-locked"></a></span></h2>

 

11/22/2025 1:14:45 PM
Gravatar
Total Posts 546
feet planted firmly on the ground

Re: Module title not respecting Feature Instance Settings HTML Element For Title

Incidentally, setting this in user.config 

  <add key="ModuleTitleTag" value="h1" />
  <add key="EnableEditingModuleTitleElement" value="false" />

is also ignored - the headings still come out as H2.

I've had a quick look at the code but cannot see what's wrong.

My skin's config.json has the following, so this is not the problem:

    "Display": {
        "ShowSkinSearchInputOnSearchResults": false,
        "ShowSearchInputOnSiteSettings": false,
        "ShowModuleTitlesByDefault": true,
        "EnableEditingModuleTitleElement": true,
        "ModuleTitleTag": "h3"
    },

Help appreciated!

11/26/2025 11:33:30 AM
Gravatar
Total Posts 2262

Re: Module title not respecting Feature Instance Settings HTML Element For Title

Hi Crispin,

The problem is with too many settings to do the same thing; something mojoPortal is kind of plagued with because of the goal to remain backwards compatible at all costs. Anyway ...

Check your theme.skin file. You likely have UseModuleHeading set to false on the ModuleTitleControl. This ignores the element set on the module, regardless of any other settings.

I've been working on an update to replace how all of this is handled to make it easier for skin developers to 1) allow/disallow changing the element and 2) limit which elements can be used.

We've also been slowly removing settings from web.config that have anything to do with skins because those settings belong in the skin.

Thanks,
Joe

11/26/2025 1:25:16 PM
Gravatar
Total Posts 546
feet planted firmly on the ground

Re: Module title not respecting Feature Instance Settings HTML Element For Title

Hi Joe

Thanks! - changing to this in theme.skin has fixed it:

<portal:ModuleTitleControl runat="server"
    UseModuleHeading="true"

And good news you're working on rationalising all of this smileyyes