sef url to article in info bubble

  • nico
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 year 1 month 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
1 year 1 month 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 thanslation ;)

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

More
8 months 2 days ago - 8 months 2 days 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:
$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:
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: 8 months 2 days ago by emmexx.

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

More
8 months 2 days 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 thanslation ;)

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

More
3 months 3 weeks 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).
$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
$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
3 months 3 weeks ago - 3 months 3 weeks 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 thanslation ;)
Last edit: 3 months 3 weeks ago by Dima.

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

Time to create page: 0.049 seconds

Donate


Go to top