[Solved] Problem with Pretty URL

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
s7orm
New Member
New Member
Posts: 8
Joined: Tue Mar 18, 2008 11:09 am

[Solved] Problem with Pretty URL

Post by s7orm »

Hi,

I have an (understanding) problem with the pretty URL idea.
I read the tutorial on the cmsms website and I did the same with my own module:
1. I extended the SetParameters() function with:

Code: Select all

$this->RegisterRoute('/hands\/(?P<selectedhand>[0-9]+)\/(?P<returnid>[0-9]+)$/', array('action'=>'default'));
(e.g.)
2. I modified one of the links:

Code: Select all

$this->CreateLink($id, 'viewhand', $returnid, $temp_h, array('selectedhand'=>$row['id']), '', '', '', '', '', [b]'hands/'.$row['id'].'/'.$returnid[/b]);
(e.g)

I get no error message - I have a list with some objects and when I select 1 of them the linkbar in my browser says www.blabla.com/index.php/hands/156/18/, but the specified object details are not shown, but the list (with all objects) instead.

Am I missing something?

Thanks in advance.
Last edited by s7orm on Wed Apr 16, 2008 10:33 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Problem with Pretty URL

Post by calguy1000 »

the registerroute function will not call the appropriate action by itself, you need to tell it what action

or do it in the action.defaulturl.php file.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
s7orm
New Member
New Member
Posts: 8
Joined: Tue Mar 18, 2008 11:09 am

Re: Problem with Pretty URL

Post by s7orm »

Thanks for the reply. Can you give me an example, because this is not documented in the tutorial?
s7orm
New Member
New Member
Posts: 8
Joined: Tue Mar 18, 2008 11:09 am

Re: Problem with Pretty URL

Post by s7orm »

problem solved
Pierre M.

Re: Problem with Pretty URL

Post by Pierre M. »

Hello,
s7orm wrote: problem solved
feel free to improve the wiki with your hints and feedback.

Pierre M.
Post Reply

Return to “Modules/Add-Ons”