Menu title not visible even if Insert hyperlink descriptions ("title" attribute) into hyperlink texts. (Default: disabled) option is checked in superfish menu configuration

Created on 11 October 2022, over 2 years ago
Updated 18 July 2024, 10 months ago

Menu title not visible even if Insert hyperlink descriptions ("title" attribute) into hyperlink texts. (Default: disabled) option is checked in superfish menu configuration

When we place the superfish menu block in block structure for particular region we have to set some configurations in that we have checkbox option to show menu title as- Insert hyperlink descriptions ("title" attribute) into hyperlink texts. (Default: disabled) if we checked this option it should display the menu title.

There are code available for hiding menu title as // Hiding link descriptions (the "title" attribute). if ($settings['hide_linkdescription']) {
$item['options']['attributes']['title'] = '';
}
same we have to add for displaying menu title using $settings variable
if ($settings['add_linkdescription']) {
$item['options']['attributes']['title'] = $item['text'];
}
so it will add menu title if checkbox is checked in configuration .

๐Ÿ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia snehahande

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium lobsterr
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rakesh.regar Rajasthan, India

    rakesh.regar โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Success
    15 days ago
    Total: 141s
    #476699
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium lobsterr

    I am not sure what is the problem on your side, but by default the title is always displayed:

    As you see I set for my menu description property "SOME DESCRIPTION" and it is correctly displayed:

    <a href="/" title="SOME DESCRIPTION" class="is-active sf-depth-1 menuparent" role="menuitem" aria-haspopup="true" aria-expanded="false">subchild</a>
    

    We have 2 options to manipulate title:

    1) Disable hyperlink descriptions ("title" attribute) (Default: disabled)

    If I check this option I will get the next result:

    <a href="/" title="" class="is-active sf-depth-1 menuparent" role="menuitem" aria-haspopup="true" aria-expanded="false">subchild</a>
    

    As you see the title is empty!

    2) Insert hyperlink descriptions ("title" attribute) into hyperlink texts. (Default: disabled)

    If I check this option I will get the next result:

    <a href="/" title="" class="is-active sf-depth-1 menuparent" role="menuitem" aria-haspopup="true" aria-expanded="false">subchild <span class="sf-description">SOME DESCRIPTION</span></a>
    

    as you can see description was added to a text of this link.

    Could you explain what is the problem here then?

Production build 0.71.5 2024