[img] not working in title

[img] not working in title was created by Muenchen-Michi

Posted 6 years 7 months ago #44533
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.

Replied by ced1870 on topic [img] not working in title

Posted 6 years 7 months ago #44536
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

by ced1870

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

Replied by Muenchen-Michi on topic [img] not working in title

Posted 6 years 7 months ago #44538
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.

Replied by ced1870 on topic [img] not working in title

Posted 6 years 7 months ago #44539
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

by ced1870

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

Replied by Muenchen-Michi on topic [img] not working in title

Posted 6 years 7 months ago #44807
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:6 years 7 months ago by Muenchen-Michi
Last edit: 6 years 7 months ago by Muenchen-Michi.

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

Replied by ced1870 on topic [img] not working in title

Posted 6 years 7 months ago #44812
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

by ced1870

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

Time to create page: 0.810 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1227 guests and no members online