[TYPO3-mvc] Advanced configuration for RealUrl with Extbase

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Thu Jun 17 01:35:48 CEST 2010


Hello to all!

I'm new to RealUrl, especially in configuring it manually - until now I 
was fine using the auto-generation of the configuration and this feature 
works really well, I needa say. ;o)

Today I played around with the RealUrl auto-generation hook, and was 
able to add a customized configuration for my extension - and in case of 
'functionality' it works quite well and like desired.

My URIs now look like this:

Viewing a specific category:
host/page/hype_store/Category/list/4/Clothing/

Viewing a specific category, a bit deeper in the tree:
host/page/hype_store/Category/list/4,5/Shoes/

Normally the URI would look like this:
host/page/?tx_hypestore_category[category]=4&tx_hypestore_category[path]=4&tx_hypestore_category[action]=list&tx_hypestore_category[controller]=Category&cHash=be055a269dab6533de5bb2aaac456298

So in general this is already a huge improvement imho, but I want to 
take this a level further with still a more optimized URI.

As you can see I need to pass the "path" with the URI, to know in which 
category-rootline I'm actually in. (That's because you can assign a 
category to multiple parent-categories, which have - you guess it - 
different places in the "category tree".)

So, I'm not sure what is possible at best, but something like this would 
be really cool:

Extension page:
host/page/

With viewing a category:
host/page/a-category/

Another category:
host/page/a-category/a-category-in-another-category/

Viewing a product:
host/page/a-category/a-category-in-another-category/a-product/

Right now I think that's not possible, because RealUrl can't (and that's 
of course obvious) know it 'a-product' is the name of a real 
product-record or a category-record.

Thus - and here I'm not sure - RealUrl needs unique "PostVars" to 
determine which record is to be shown or which "action" needs to be called.

Am I right until here?

So, a URI must look like this:
host/page/category/a-category/

Or this:
host/page/category/a-category/a-category-in-another-category/product/a-product/

But this imho is quite long and I'm still not sure if it's possible to 
convert "tx_hypestore_category[path]=4,2" to 
"/a-category/a-category-in-another-category/"?!

I've had a look at some newsgroup-conversations and also some tutorials 
on the web, but they all don't go into detail about this.

It would be really cool if there's somebody who is experienced in this 
and could give me some hints or even a half-baked solution to my thoughts.

Thanks a lot in advance,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list