sef url to article in info bubble

More
5 years 6 months ago #12394 by nico
sef url to article in info bubble was created by nico
Hi,
I'm trying to find out why I don't get a sef url when clicking on the article that I selected in the info bubble (integration tab in the placemark list).
What I expected was that Joomla would deal with the url but for some reason it's not.

Is it me who is expecting the wrong thing ?
Thanks for any tips.
Nico

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

More
5 years 6 months ago #12398 by Dima
Replied by Dima on topic sef url to article in info bubble
Hi Nico.
For that case I create manual link to article, and it is not processed by any sef plugin. If you want, you can enter alternative URL, and in this case it will be used for open an article

Don't forget support my developments: post review in JED , donate , help with translation ;)

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

More
5 years 2 weeks ago - 5 years 2 weeks ago #12626 by emmexx
Replied by emmexx on topic sef url to article in info bubble
I have the same problema as the OP and your suggestion to enter manually the sef link isn't feasible if you many many placemarks/articles.
I checked the code of the component and found out 2 files

site/helpers/placemarks.php
site/views/zhosmap/tmpl/display_map_data.php

where you build the link to be used in the placemark:
Code:
$returnText .= ' src="'.JURI::base().'index.php?option=com_content&view=article&id='.$currentmarker->articleid.'&tmpl=component"';
(there are other lines where you build a link)

The Joomla docs suggest to build a sef url in a different way:
Code:
echo \Joomla\CMS\Router\Route::_('index.php?view=article&id=1&catid=20');
Supporting SEF URLs in your componenthttps://docs.joomla.org/J3.x:Supporting_SEF_URLs_in_your_component
I didn't patched and tested your component but I think it could solve the problem.

Thank you
maxx
Last edit: 5 years 2 weeks ago by emmexx.

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

More
5 years 2 weeks ago #12630 by Dima
Replied by Dima on topic sef url to article in info bubble
Thanks maxx,
I'll check it and if it's OK I'll fix it.

Don't forget support my developments: post review in JED , donate , help with translation ;)

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

More
4 years 8 months ago #13305 by emmexx
Replied by emmexx on topic sef url to article in info bubble

Dima wrote: Thanks maxx,
I'll check it and if it's OK I'll fix it.


I saw that in January you implemented this, thank you.
I tested with Zh_OpenStreetMap but it is not working correctly in my joomla setup.

The placemarks are related to articles that have not a menu item. They are connected to a hidden menu. I don't know if sef links work for a normal menu.
Anyway i tried to edit the code in process_placemark.php and added catid to the url to transform using jroute (I added manually the value of the category id that corresponds to the article related to the placemark I wanted to test).
Code:
$marker_link = JRoute::_('index.php?option=com_content&view=article&id='.$currentmarker->articleid);
doesn't work and gives www.mysite.it/?view=article&id=37
Code:
$marker_link = JRoute::_('index.php?option=com_content&view=article&id='.$currentmarker->articleid.'&catid=20');
works and the resulting url is www.mysite.it/myhiddenmenu/myarticlealias .

Is it possible, and is it correct, to retrieve the catid of the placemark article and change accordingly the Jroute code lines?

Thank you

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

More
4 years 8 months ago - 4 years 8 months ago #13306 by Dima
Replied by Dima on topic sef url to article in info bubble
Hi.
I'll check it.
When I implemented this fix it was work.
Today I checked - contacts works correctly, but article write simple code (not SEF).
Tomorrow I'll check - add category for the article and check.
If all will be OK then fix my all extensions.

Don't forget support my developments: post review in JED , donate , help with translation ;)
Last edit: 4 years 8 months ago by Dima.

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

Time to create page: 0.205 seconds
Powered by Kunena Forum