Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Is there a way to get a joomsef url via PHP?
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: Is there a way to get a joomsef url via PHP?

Is there a way to get a joomsef url via PHP? 14 years, 11 months ago #9718

I have a plugin that is called when an article is saved and uses the code:
$article_url = JRoute::_(ContentHelperRoute::getArticleRoute($id_slug, $cat_slug, $sec_slug));

to get the article URL. From the backend, this gives the non-SEF url, while from the frontend this gives the SEF url. I'm wondering if there is a way to get the SEF url using the plugin even when I'm in the backend?

Thanks!

Re:Is there a way to get a joomsef url via PHP? 14 years, 11 months ago #9725

  • dajo
  • OFFLINE
  • Posts: 5069
Hello,

Since SEF is off by default in Joomla's backend, this isn't possible by any standard way. You would probably need to create your own instance of JRouterJoomsef class and use it to route the URL. But I'm affraid there would be some problems with that for example with JoomFish, which is also not active in backend etc.

Best regards,
ARTIO Support Team
ARTIO Support Team
  • Page:
  • 1
User Login Empty