Keyword

Remove title from URL

  • Thomas Thrane
  • Thomas Thrane's Avatar Topic Author
  • Offline
  • Premium Member
More
2 months 2 weeks ago #173080 by Thomas Thrane
Thomas Thrane created the topic: Remove title from URL
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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 2 weeks ago #173082 by Fotis
Fotis replied the 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.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Thomas Thrane
  • Thomas Thrane's Avatar Topic Author
  • Offline
  • Premium Member
More
2 months 2 weeks ago - 2 months 2 weeks ago #173083 by Thomas Thrane
Thomas Thrane replied the topic: Remove title from URL
Thank you!!!

Please close this!
Last edit: 2 months 2 weeks ago by Thomas Thrane.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 2 weeks ago #173085 by Fotis
Fotis replied the topic: Remove title from URL
You're welcome :)

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

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum