[TYPO3-dev] My first (for me) advanced extension

Andreas Förthner Andreas.Foerthner at netlogix.de
Fri Mar 17 15:14:27 CET 2006


Wolfgang Klinger schrieb:
>  *hiya!*
> 
>  On Fri, 17 Mar 2006, Brian Bendtsen wrote the following:
> 
>>> > - Do I place this function in the class_myextension_pi1.php file or
>>> > do I have to create another?
>>>
>>>
>>>You don't have to put it in class.myextension_pi1.php but that would be 
>>>the most obvious thing to do (not sure I understand this question).
>>
>>Thank you, that was very helpfull.
>>
>>About that question. I have my form now and Im not sure what to put in 
>>the action attribute. Im pretty sure that I just call 
>>class_myextension_pi1.php, but what parameters is needed to tell the 
>>script to go to the function that will write something to my database table.
> 
> 
>  (1) use the Smarty template engine, believe me this is the best way to
>  do templating, don't even start with this TYPO3 templating stuff
>     http://smarty.php.net/
>     http://typo3.org/extensions/repository/search/smarty/1.0.2/
> 
>  (2) e.g.
> ----
> $action = t3lib_div::linkThisScript(Array());
> ----
>  or use the link methods in tslib_pibase (take a look at that class).
> 
>  and use something like:
> ----
> <input type="hidden" name="tx_myext_pi1[action]" value="save" />
> ----
>  you can access this value with
> ----
> $this->piVars['action']
> ----
>  in your plugin.
> 
>  (3)
>  You can use the pi1 method as "controller" and delegate to other classes
>  as well, simply include them with
> ----
> require_once(t3lib_extMgm::extPath('tx_myext').'lib/my_special_class.php');
> ----
> 
>  
>  HTH, if not don't hesitate to ask again.
> 
> 
>  bye
>  Wolfgang
> 
Hi,

as I see now, I forgot the namespace part in the form's name attribute. 
Sorry for that, just do like Wolfgang descriped it.

But sorry Wolfgang, what's the problem about TYPO3's templating?

Regards

Andreas




More information about the TYPO3-dev mailing list