SEF and custom links in a module
- yanoboy
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
14 years 5 months ago - 14 years 5 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
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
Last Edit: 14 years 5 months ago by yanoboy.
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
14 years 5 months ago #5760
by Saka
Emir Sakic
www.sakic.net
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
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.
- yanoboy
-
Topic Author
- Offline
- New Member
-
Less
More
- Thank you received: 0
14 years 5 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:
Thanks again.
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.
- Saka
-
- Offline
- Administrator
-
14 years 5 months ago #5762
by Saka
Emir Sakic
www.sakic.net
Right, that's what I meant.

Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.