[TYPO3] Pass parameters to an extension

Peter Russ peter.russ at 4many.net
Tue Jun 17 12:35:23 CEST 2008


--- Original Nachricht ---
Absender:   bernd wilke
Datum:       17.06.2008 10:35:
> on Tue, 17 Jun 2008 01:12:28 +0200, Rafael Álvarez wrote:
> 
>> Hi guys,
>>
>> I have a particular problem but I think is a generic question. I have a
>> field in the fe_users table that contains a link to a pdf document in
>> the fileadmin tree. I want to create a link using feusersview to another
>> page to see the document with sk_pdfviewer. I don´t know how to pass the
>> page id and the document name to the sk_pdfviewer extension.In general,
>> how to pass parameters to an extension, is the information inside the
>> class.xxxx_pi.php file of the extension or I have to set a variable and
>> read it with typoscript for the target extension?. Maybe this is a
>> simple question but I haven´t found the answer.
>>
> first: if you created your own field as file, your files will be copied 
> to the subdir of your extension beneath uploads and only the filename 
> (which might be modified!) is stored.
> 
> you can pass paramters with typoscript:
> plugin.tx_yourext_pi1.var1 = 123
> can be read from your extensions as: 
> $conf['var1']
> and keep in mind for subarrays:
> plugin.tx_yourext_pi1.var2.subvar1 = 123
> is         v--- watch this dot!
> $conf['var2.']['subvar1']
> 
> the other way would be a flexform which is more complex, but also more 
> flexible, as each usage of the plugin can get it's own parameters.
> 
> in german:
> http://www.pi-phi.de/t3v4/171.html
> 
> bernd

IMHO the easiest way would be to ask Steffen to support dynamic passing 
of the pdf filename to the extension in piVars or rewrite the extension 
to your needs as that are only a few lines of code.

Peter.


-- 
Fiat lux!
Docendo discimus.
_____________________________
4Many® Services
XING: http://www.xing.com/go/invuid/Peter_Russ


More information about the TYPO3-english mailing list