[TYPO3-mvc] RealURL with extBase

Rens Admiraal renst3 at e-rank.nl
Thu Jan 21 12:14:26 CET 2010


But is writing a custom realurl hook no overkill?

Why are parameters in the url even necessary if they only contain the default 
value?

On Thursday 21 January 2010 11:58:23 Franz Koch wrote:
> Hi
> 
> > It would be super easy to do something like this with RealURL:
> >
> > /pageintypo3wheremypluginis/controller/blog/action/show/blogname/my-blog-
> >name/
> 
> ...
> 
> > I'm not really satisfied with this solution because a url for my domain
> > would end up being:
> >
> > /recipes/controller/recipe/action/show/recipe/meatballs-with-gravy/
> >
> > That's ugly and too long! :)  /recipe/ shows up more than once and
> > /controller/action/ shouldn't be necessary.
> >
> > In a perfect world, I'd have pretty urls like this:
> >
> > /recipes/show/meatballs-with-gravy/
> > /recipes/dishes/main-course/
> > /recipes/dishes/
> 
> ...
> 
> > Anyone else given this much thought?  What are you doing in your
> > extensions?
> 
> How about using one of realUrls hooks to process the generated URLs by
> hand? You might be able to remove the controller and action completely
> from your urls depending on what other parameters are set. So if a
> "blog" id is given and nothing else, it's most likely the blog
> controller and the index action. If you've got a blog and a post id,
> it's most likely the post controller and the index action etc.. And if
> your URL is ending with 'edit' or 'create' then it's not the index
> action of the according controller, but some other. So I think by
> manually processing the URL generation in realUrl you will get even
> nicer URLs as for any regular v4 extension using default realUrl
> possibilities.
> 


More information about the TYPO3-project-typo3v4mvc mailing list