28/10 2012
Automatic Realurl Rules

URL Mojo going up.

UPDATE: for a short while the feature will require the <link http: git.typo3.org typo3v4 extensions realurl.git external-link-new-window external link in new>most recent Git master of Realurl as well. If <link https: review.typo3.org c external-link-new-window external link in new>this Realurl patch is still not merged when you read this you also need to apply that before you can use the most recent iteration of FED's Realurl feature.

Dear developers,

Last night I finished the first iteration of a FED feature that I want to tell you a little about. There have been so many times where I wished that my Extbase extensions could have Realurl rules created for them automatically - and I finally solved this.

Using a hook in Realurl and some processing of the current content elements, FED can now make automatic Realurl rules for all installed Extbase plugins which use arguments (since arguments are what makes sense to Realurl) and only for the topmost plugin on the page currently - in order to avoid rule colissions. SwitchableControllerActions are supported and using a Domain Object as an argument for your controller action (i.e. your showAction) a rule is added to perform lookup in the table used by that Domain Object.

This means that extensions like EXT:news are automatically set up with a basic URL rewriting for things like detail views. With no need whatsoever to use a custom Realurl configuration. Since all content elements are scanned the rules are automatically added for every page which has - for example - an EXT:news detail view. The rules are rebuilt when the realurl_autoconf.php file is removed (and a hook will be used to take care of that when "all caches" are cleared).

The feature can be enabled simply by enabling the extension configuration switch (it's located where all the other switches for features are located; in the EM's extension config panel for EXT:fed) and is currently merged in the Github master if you want to have a go at it: <link https: github.com namelesscoder fed external-link-new-window external link in new>github.com/NamelessCoder/fed. You can also read the commit message explaining some of the technical details: <link https: github.com namelesscoder fed commit b7eb6dc24770e0f679bc25c0968fee89ec4baf2d external-link-new-window external link in new>github.com/NamelessCoder/fed/commit/b7eb6dc24770e0f679bc25c0968fee89ec4baf2d.

My hope is that this makes your life a whole lot more easier by making your extension's URLs prettier - and by automatically recognising changes such as a new page that requires rules.

Future plans include the use of class and method annotations to define in detail how FED should process each Controller and action when this feature is enabled. Using class annotations is comfortable enough for this tiny configuration purpose - and they are of course completely non-destructive and silently ignored by everything that doesn't use them.

I would be happy to hear your suggestions and ideas. I am after all building this for all of us, not just me ;)

Cheers,
Claus

 

Archive

09/01 2017
09/11 2016
09/06 2016
21/12 2015
07/12 2015
25/11 2015
25/09 2015
22/09 2015
01/08 2015
10/03 2015
03/03 2015
12/02 2015
25/11 2014
01/11 2014
16/10 2014
02/10 2014
02/10 2014
19/09 2014
18/09 2014
05/09 2014
22/08 2014
02/08 2014
27/06 2014
06/06 2014
13/04 2014
27/03 2014
12/03 2014
11/03 2014
05/02 2014
25/01 2014
17/12 2013
08/12 2013
03/12 2013
04/11 2013
Flux 7.0 Teaser
06/08 2013
21/07 2013
10/06 2013
04/06 2013
01/06 2013
27/05 2013
19/05 2013
19/05 2013
11/05 2013
26/04 2013
30/03 2013
19/03 2013
17/03 2013
13/03 2013
10/03 2013
10/03 2013
05/03 2013
04/03 2013
03/03 2013
02/03 2013
01/03 2013
28/02 2013
27/02 2013
25/02 2013
24/02 2013
24/02 2013
23/02 2013
10/02 2013
03/02 2013
03/02 2013
27/01 2013
Asset management in Fluid
20/01 2013
16/01 2013
13/01 2013
08/01 2013
16/12 2012
25/11 2012
18/11 2012
08/11 2012
07/11 2012
05/11 2012
04/11 2012
28/10 2012
22/10 2012
14/10 2012
13/08 2012
08/08 2012
31/07 2012
30/07 2012
25/07 2012
29/04 2012
29/04 2012
22/04 2012
16/04 2012
21/03 2012
Flux 1.4.0 released
08/03 2012
Flux 1.3.0 released
04/03 2012
03/03 2012
28/02 2012
19/02 2012
A Sneaky Sneak Preview of the next version of Flux
13/02 2012
12/02 2012
06/02 2012
30/01 2012
27/01 2012
15/01 2012
26/12 2011
24/12 2011
11/12 2011
11/12 2011
10/12 2011
04/12 2011
04/12 2011
30/11 2011
26/11 2011
25/11 2011