[Typo3] Creating an extension

Joshua Preston jpreston at americatab.com
Tue May 17 15:54:15 CEST 2005


René,

In your class.tx_myplugin.pi1.php source file, you should have a couple 
lines that look like:

...

class tx_myplugin_pi1 extends tslib_pibase {
    var $prefixId = 'tx_myplugin_pi1';        // Same as class name
...

If you want to add that plugin to your Template, you'll need to set the 
variables either site-wide in your constants, in instance wide in your 
setup.

If sitewide, add something like the following to your template constants:

plugin.tx_myplugin_pi1 {
  color = blue
  option = left
  wrap = <b> | </b>
  ...
}

Then, in your setup, add:

whatever.mapping < plugin.tx_myplugin_pi1

If you want a separate instance, unrelated to the rest of your site, 
which I personally prefer:

temp.myplugin < plugin.tx_myplugin_pi1
temp.myplugin {
  color = blue
  option = left
  wrap = <b> | </b>
}

whatever.mapping < temp.myplugin

Either route, you should have no problems.

Thanks!

Joshua Preston.

René Schade wrote:

>Hi
>
>I've been writing a few simple extensions. All of them generates their content as a frontend plugin, which is quite easy, using the kickstarter, and later on insert the plugin on a page.
>
>Now I want to create an extension generating output defined in a template (the extension's output must be on all pages).
>
>But, how do I do this the right way? I can't find any documentation explaining me how to do this?
>
>I need to do something like this in my configuration:
>
># static configuration
>myextension{
>configuration1:1
>configuration2:blue
>configuration3:maybe
>}
>
>page.10<myextension.getTHML
>
>I guess myextension.getHTML is som kind of call to a method in my extension - does this technique have a name?
>
>Could someone please tell me where to find more information about doing this - the right way.
>
>Regards,
>René
>
>_______________________________________________
>Typo3-english mailing list
>Typo3-english at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>  
>



More information about the TYPO3-english mailing list