Submenu's heading doesn't heed $cf[menu][levels]

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Submenu's heading doesn't heed $cf[menu][levels]

Post by cmb » Sat Jul 05, 2014 11:55 am

Hello Community,

I've just noticed that the heading of the submenu is always <h4> (function submenu() in cmsimple/tplfuncs.php):

Code: Select all

            return '<h4>' . $tx['submenu']['heading'] . '</h4>'
                . li($ta, 'submenu');
IMO that is a bug, as the submenu will be marked as <h4> even if the page heading might be <h5>.

I suggest we change that to:

Code: Select all

            $ml = min($cf['menu']['levels'] + 1, 6);
            return '<h' . $ml . '>' . $tx['submenu']['heading'] . '</h' . $ml . '>'
                . li($ta, 'submenu');
As the bug is a minor one, and seems to be long standing (at least since CMSimple 2.0), IMO there is no need to hurry, and it is sufficient to fix it for XH 1.6.4.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Submenu's heading doesn't heed $cf[menu][levels]

Post by cmb » Thu Jan 01, 2015 10:04 pm

Done (r1433).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply