[TYPO3] CoolURI, urlsuffix and .xml extension
Jigal van Hemert
jigal at xs4all.nl
Mon Jul 21 19:27:41 CEST 2008
Grégory Duchesnes wrote:
> Is there another way to build those URLs?
Yes, there is :-)
If you look at the thesis behind the CoolURI extension
(http://download.bednarik.org/URITransformer.pdf) on page 38 (section
7.8.3) it describes the Userfunc element.
Now if you look at the default configuration at
http://docs.google.com/View?docid=dd33gg45_3f8j96p (see Step 8 -
CoolUriConf.xml Check) then you see that the pagepath element is defined as:
<pagepath>
<title>alias,subtitle,title</title>
<saveto>id</saveto>
<default>0</default>
<userfunc>tx_cooluri->getPageTitle</userfunc>
</pagepath>
Okay, so the default configuration of CoolURI uses the userfunc
getPageTitle() inside class.tx_cooluri.php to build the page path.
getPageTitle() is simply a wrapper around getPageTitleBE(), so the magic
is in that latter function.
If you make an extension of your own with a class file with a modified
copy of the getPageTitleBE() function, simply use the names of the class
and function in your configuration of CoolURI.
Debug the output in each stage of the function and you'll see how the
array with parts of the page path is built.
I once customized this function to pieces and ended up with URL's that
looked exactly as they were specified by the client.
--
Jigal van Hemert.
More information about the TYPO3-english
mailing list