Okay, my mistake but your solution allows something like /index/123 (if :article
is the article_id). I want that /, /index and /index/index use ArticleController
with indexAction. If no article_id is given, the application will show the
newest article.
The actual problem is, that I don´t see a solution how to use
ArticleController::indexAction() at /, /index and /index/index without adding
one entry per route (= 3 routes with the same target). I think this will work,
but I don´t think that this is an clean solution.
-- Jan
Jan Pieper wrote:
Where is my mistake? Why is / != /index != /index/index?
It's not the problem with your router implementation but with your
route. You have specified a static route string (index/index), so it
matches only this particular URL. Try something like this instead:
name=index {
module: null
controller: article
action: index
route: :controller/:article
}
-- Jan