This conversation seems much bigger than the problem being discussed :)
Why not
Define one route for /galleries/ (that uses the method index or
whatever you want to call it)
Define one route for /galleries/history/* (that uses the method
history)
Define one route for /galleries/* (that calls the
xOrster: what a user want's to have a gallery named "list" ? what then?
I think it's not a good way to define the second url parameter as a
method parameter
I think the best way would be something like
http://host/galleries/gallery/foo
but I know it would be better your way, is just you are limi
I took the blog example from the cakephp manual to explain what I want,
but i'm not developping a blog but a web gallery, for example :
I have 2 galleries : foo, and bar
I want to access them from http://host/galleries/foo and
http://host/galleries/bar
If someone try something else like
http://hos
Why would you want a catch-all? What would you want to do if someone
hit http://localhost/blog/sumthin ?
However, with the way that AD7six explained it, it should create your
catch-all functionality.
The bad thing is that you may have to define a route for every method
in the blog controller t
Ok, thanks you AD7six
So I need to add a route for each other members functions in
BlogController. It's too bad that there is no way to define a route
functionning like a "catch-all" if the function does not exist.
Thanks for your help
--~--~-~--~~~---~--~~
You r
I don't know if this can be done automatically just using a single
route. If you want:
http://host/blog/test => Blog->Index('test')
BUT
http://host/blog/history/2006 => Blog->History('2006')
Then one thing you could do is hand over the routing logic to your
BlogController's index function, by us
Ok, I think I didn´t understand your problem properly, xOrster! ;o)
I didn´t know that you want all actions redirect to index, except
"history".
I think the answer by AD7six is right. I didn´t test it, but it sounds
correct.
Cheers.
--~--~-~--~~~---~--~~
You rec
Ok, I think I didn´t understand your problem properly, xOrster! ;o)
I didn´t know that you want all actions redirect to index, except
"history".
I think the answer by AD7six is right. I didn´t test it, but it sounds
correct.
Cheers.
--~--~-~--~~~---~--~~
You rec
<< Google posting errors are a pain, the posts usually go through and I
apologise in advance if this is a duplicate post >>
Hi x0rster,
I hope I can add some clarity :)
> $Route->connect ('/blog/:action/*', array('controller'=>'Blog',
'action'=>'index'));
This route says that the second paramet
Oups,
Sorry I've got some problems with google groups server
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this
I will try to explain more precisely :
I want that http://host/blog/test invoke index action of blog
controller with "test" as a parameter to index function if test is not
a member function of blog controller
And if test is a function of blog controller, I want that test function
is runned and no
I will try to explain more precisely :
I want that http://host/blog/test invoke index action of blog
controller with "test" as a parameter to index function if test is not
a member function of blog controller
And if test is a function of blog controller, I want that test function
is runned and no
I will try to explain more precisely :
I want that http://host/blog/test invoke index action of blog
controller with "test" as a parameter to index function if test is not
a member function of blog controller
And if test is a function of blog controller, I want that test function
is runned and no
Hi.
I think, you don´t need to rewrite your Router.
"index" is the default action, if no action is given.
url: www.example.com/blog/ -> controller: blog, action: index
Am i wrong or i can´t understand you?
Cheers.
--~--~-~--~~~---~--~~
You received this messag
Hi,
I'm trying to get this working (from the cake manual) :
--
The following example joins all the urls in /blog to the
BlogController. The default action will be BlogController::index().
$Route->connect ('/blog/:action/*', array('contr
Sounds like what youa re wanting is a
$Route->connect('/blog', array('controller'=>'Blog',
'action'=>'index'));
You cannot using the :action and then also explicitly define the
action. And if you didn't then you are just reverting back to the
default behaviour. So, sounds like you just want th
16 matches
Mail list logo