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

Daniel Lundsgaard Skovenborg waldeinburg at gmail.com
Tue Feb 14 16:09:45 CET 2012


Hi Jan,

Thanks! I'm trying the userfunc way (solution 2 and 3).
Embarrassing question: how do I make a function from an extension
available for cooluri? I get the following warning:
... Core: Error handler (FE): PHP Warning: call_user_func() expects
parameter 1 to be a valid callback, class 'tx_foobar_pi1' not found in
/path/to/server/www/typo3conf/ext/cooluri/cooluri/link.Functions.php
line 320 ...
I also tried to load the js_news_cooluri extension and use the
function it was supposed to provide, but with the same result.

Regards,
Daniel

2012/2/11 Jan Bednarik <info at bednarik.org>:
> Hi Daniel,
>
> basically - one parameter can be translated only into one pagepath.
>
> There are some other options
>
> 1) You can play with SQL - select more elements and use CONCAT on them to
> return stuff/like/this
>
> 2) You can replace default page path function with your own
>
> 3) You can write userfunc for given element:
>
> <part>
>        <parameter>yourparam</parameter>
>        <userfunc>class->function</userfunc>
> </part>
>
> That paramconstraint element is not much of a use. It mean to check whether
> a parameter should be translated.
>
> Regards
>
> Jan
>
>
> Dne 10.2.2012 22:20, Daniel Lundsgaard Skovenborg napsal(a):
>
>> 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
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



-- 
http://waldeinburg.dk


More information about the TYPO3-english mailing list