[TYPO3] Pass parameters to an extension

bernd wilke xoonsji02 at sneakemail.com
Tue Jun 17 10:35:56 CEST 2008


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
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html


More information about the TYPO3-english mailing list