[img] not working in title

More
9 years 2 months ago #44533 by Muenchen-Michi
I have the current version 8.2.4 of Maximenu CK on Joomla 3.7.5 and want to hide the title of the menu with the [img]-attribute. But the title is still show and also [img] is part of the title. I also have a description in the title.

I had a Joomla 2.5 Site an the this worked fine with an old version 5.15 of Maximenu CK.

You can see the behavior on www.skigiesing.de (J 2.5) and neu.skigiesing.de (J 3.7). The menu with with problem is "Hexenwald". In J 3.7 the description is "Kurse mit Eigenanreise[img]" and the title itself (Hexenwald) is displayed below the normal menu on the image.

I hope, you can help men.

Kind regards,

Michael

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #44536 by ced1870
Replied by ced1870 on topic [img] not working in title
Hi
for the image, go in the menu item options >> menu link options >> show text : No
this is a native joomla feature to hide the text

tell me how it renders, because there could be some significant differences between the 2 module versions
CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #44538 by Muenchen-Michi
I already tried this setting, but then I also can't see the descreption "Kurse mit Eigenanreise".

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #44539 by ced1870
Replied by ced1870 on topic [img] not working in title
as the code has been changed a lot since the joomla 2.5 version, you should try to do a template override to do what you want here

override the "default.php" file in your template, then copy the file "_image.php" (where you can change this behavior) + the files "_itemtype.php" + "_logo.php"

in "_image.php" line 79 you can add the description to the image
Code:
$linktype = '<img src="' . $item->menu_image . '" alt="' . $item->ftitle . '"' . $image_dimensions . '/>' . $description;

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago - 9 years 1 month ago #44807 by Muenchen-Michi
Thank you for your help. I did the template-override a little different, to have the behavior as it should be.
In the description of your module is written:

To display only image in a link (without text), you must put this in the title
[ img]


But this seems not to work. I've edited the _image.php added:
Code:
if(strpos($description, "[img]")!==false) { $description=str_replace("[img]","", $description); $item->ftitle=""; }
I think this should be generally part of the module, so that the description of you module is correct.
Last edit: 9 years 1 month ago by Muenchen-Michi.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #44812 by ced1870
Replied by ced1870 on topic [img] not working in title
there is a problem in your way to look at your request ;)
if you want some text with image (your case), then use the menu item title + image. No need to have a description field, a text is a text. Using the title, works

if you don't want any text, set it to show = no, then no title nor description at all

in your cause you should use the title field, simply. Then you will tell me that it does not look the same, because the text is smaller, but this is just a CSS adjustment to do.

also in the override, I have told you wha to modify in the default.php file, and you are editing the _image.php file. This is not correct

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 2987 guests and one member online