On Thu, 24 Jun 2010, Tom Ptacnik wrote:

> I don't get why in first example the Output: http://localhost/blog/page/2
> 
> If you want the output like this just define your route like
> 
> blog:
>   url:             /blog/page/:page
>   param:       { module: blog, action: list, page: 1 }


Yeah I was confused by that too.

The other thing is, all the routes have the same name so maybe the routing 
will always pick the first one when using named routes?



> On 23 čvn, 13:55, "Ivo Az." <sep...@gmail.com> wrote:
> > These are just example routes, there are no routes with the same name.
> > Why should order of route matter when I use it's name in the url
> > helper (e.g. link_for(5 '@blog?page=5'))?
> > For Route 3 this should outputhttp://localhost/blog/page/5, but the
> > output ishttp://localhost/blog.
> >
> > On Jun 23, 4:38 am, Eno <symb...@gmail.com> wrote:
> >
> >
> >
> > > Remember the orderf of routes *does* matter, so you should have most
> > > specific route to least specific routes, e.g. using a wildcard will
> > > match all routes that start /blog so probably that route should be last.
> >
> > > On Tue, 22 Jun 2010, Ivo Az. wrote:
> > > > Here's examples:
> >
> > > > ------------ Link ----------------
> > > > <?php echo link_to($page, '@blog?page='.$page) ?>
> >
> > > > ------------ Route 1------------
> > > > blog:
> > > >   url:             /blog/*
> > > >   param:       { module: blog, action: list }
> >
> > > > Output:http://localhost/blog/page/2
> >
> > > > ------------ Route 2------------
> > > > blog:
> > > >   url:             /blog/:page
> > > >   param:       { module: blog, action: list, page: 1 }
> >
> > > > Output:http://localhost/blog/2
> >
> > > > ------------ Route 3------------
> > > > blog:
> > > >   url:             /blog/*
> > > >   param:       { module: blog, action: list, page: 1 }
> >
> > > > Output:http://localhost/blog
> >
> > > > Why in 3rd case the url does not contain the page parameter as in
> > > > first example?
> 
> 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to