[TYPO3-english] CoolURI, pagepath and ab_downloads (Modern Downloads)

Daniel Lundsgaard Skovenborg waldeinburg at gmail.com
Fri Feb 10 22:20:04 CET 2012


Hi,

I'm stuck in my attempt to configure CoolURI for ab_downloads.
I have two aims:

1. tx_abdownloads_pi1[category_uid] should be translated into a
pagepath (/page/parent-category/category/).
Just fetching the category label in a lookindb element is bad because
it gives some duplicate urls (e.g. when two categories have a
Documents subcategory).

2. Download urls should be in the form
/download-file/parent-category/category/file
I.e., the standard pagepath should be stripped from the url. I have
two pages with download modules, but it doesn't matter which of these
page id's is stored in the cache for file downloads.

And now for the questions:

@1: I cannot define more than one pagepath element, can I? Can achieve
the same result with a userfunc in uriparts?

@2: I thought I could strip the pagepath using paramconstraints:
	<paramconstraints>
		<paramconstraint param="tx_abdownloads_pi1[action]">
			<type>string</type>
			<compare>neq</compare>
			<value>getviewclickeddownload</value>
		</paramconstraint>
	</paramconstraints>
I'm not sure I understood the paramconstraints element correctly and I
cannot find any examples (not in the manual either). Is
paramconstraints even the way to do this? Can someone give an example
of the use of this element?
Alternatively, I thought of writing a userfunc returning blank if
tx_abdownloads_pi1[action] is getviewclickeddownloadcalling or calling
tx_cooluri->getPageTitle. Any comments on this?

Regards,
Daniel


More information about the TYPO3-english mailing list