SEF and custom links in a module

13 years 10 months ago - 13 years 10 months ago #5759 by yanoboy
Hi!

I have some problems with some custom links i'm trying to output in one of my module.

For example, i have the original link: index.php?option=com_content&view=article&id=2943&Itemid=417

Then i have to append a var to this url so i can display proper content in my module: index.php?option=com_content&view=article&id=2943&Itemid=417&city=XXXX

I have read the tutorial about "Building extensions for SEF Advance" cause that seam to be exactly what i needed. But the "sef_ext.php" just doesn't seam to run (it is place in the com_content folder).

Maybe i'm doing this wrong. In my module i expected to see the custom url to be rewritten.

So i would appreciate to have some tips on how to deal with custom url (i simply add a var to the end) and i would like to see this var to be appended to the generated url in my page...

Thanks

By the way, i use:
SEF Advance 2008
v2.2 (13.01.2010)

Maybe a version problem

Yan

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

13 years 10 months ago #5760 by Saka
You can't modify core components and their URLs with sef_ext.php. Only the 3rd party components.

You can append the variable to SEF Advance URL e.g. http://domain/section/category/article/?city=XXXX

In your code that would be something like
JRoute::_($link.'?city=XXXX')

Emir Sakic
www.sakic.net

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

13 years 10 months ago #5761 by yanoboy
Thanks for your answer.

It now works but this part did not work: JRoute::_($link.'?city=XXXX')

The '?city=XXXX' cannot be placed (i don't know why) in the JRoute cause it disappear.

SO this is how it worked for me:
$link = JRoute::_('index.php?option=com_content&view=article&id=2943&Itemid=417');
$link .= '?city=XXXX';

Thanks again.

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

13 years 10 months ago #5762 by Saka
Right, that's what I meant. :)

Emir Sakic
www.sakic.net

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

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch