Keyword

Remove title from URL

  • Thomas Thrane
  • Thomas Thrane's Avatar Topic Author
  • Offline
  • Premium Member
More
4 years 7 months ago #173080 by Thomas Thrane
Remove title from URL was created by Thomas Thrane
Hi

When not using SEF, I get this URL of a product:
kr.thrane.nu/index.php?option=com_k2&view=item&id=47:flexowash-plate-cleaner&Itemid=759

How can I get the name after the id NOT to show, so I get:
kr.thrane.nu/index.php?option=com_k2&view=item&id=47&Itemid=759

I need to grab that id, but only the number, not the title.

regards
Thomas

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

More
4 years 7 months ago #173082 by JoomlaWorks
Replied by JoomlaWorks on topic Remove title from URL
That's the title alias and you can't easily remove it. But it's dead simple to grab the ID of the K2 item.

Just do (in PHP): $id = JRequest::getInt('id');

And then you can use $id anywhere you want in Joomla.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Thomas Thrane
  • Thomas Thrane's Avatar Topic Author
  • Offline
  • Premium Member
More
4 years 7 months ago - 4 years 7 months ago #173083 by Thomas Thrane
Replied by Thomas Thrane on topic Remove title from URL
Thank you!!!

Please close this!
Last edit: 4 years 7 months ago by Thomas Thrane.

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

More
4 years 7 months ago #173085 by JoomlaWorks
Replied by JoomlaWorks on topic Remove title from URL
You're welcome :)

(P.S. No need to "close it")

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum