---
title: "Template erstellung nach typo3.org part2"
url: "https://www.typo3.net/d/9053-template-erstellung-nach-typo3org-part2"
source: "typo3.net"
tags: ["Allgemein","Frage","PHP"]
created: "2004-02-12"
last_reply: "2004-02-12"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# Template erstellung nach typo3.org part2

Allgemein · 0 Antworten · gestartet 2004-02-12

## Eröffnungsbeitrag

**jojo8897** · 2004-02-12 · [Beitrag #1](https://www.typo3.net/d/9053-template-erstellung-nach-typo3org-part2/1)

Hallo ihr, ich versuche gerade nach folgender Anleitung:
<http://typo3.org/doc.0.html?&tx_extrepmgm_pi1%5BextUid%5D=490&tx_extrepmgm_pi1%5BtocEl%5D=1293&cHash=4c0fffd441>
Das mal nachzubauen um zu lernen, aber ich erhalte immer folgende fehlermeldung

Fatal error: Cannot redeclare class tx_tmselect_addfilestosel in /home/www/web1/html/typo3/dummy/typo3conf/ext/tmselect/class.tx_tmselect_addfilestosel.php on line 16

ich habe das extension tmselect genannt

anbei hier mal éin Auszug aus der ...addfilestosel.php

```php
<?php
class tx_tmselect_addfilestosel {
        var $dir = "main";

        function main(&$params,&$pObj)  {
                        // Adding an item!
                $params["items"][]=Array($pObj->sL("Mode: ".$this->dir), 999);
        }
}
class tx_tmselect_addfilestosel_ca extends tx_tmselect_addfilestosel {
        var $dir = "sub";
}
//Include the parse-html class:
require_once(PATH_t3lib.'class.t3lib_parsehtml.php');

class tx_tmselect_addfilestosel {
    var $dir = "main";
    /**
     * Manipulating the input array, $params, adding new selectorbox items.
     */
    function main(&$params,&$pObj)    {
            // configuration of paths for template files:
        $confArray = array(
            "main" => "fileadmin/template/main/",
            "sub" => "fileadmin/template/sub/"
        );

            // Finding value for the path containing the template files.
        $readPath = t3lib_div::getFileAbsFileName($confArray[$this->dir]);

            // If that directory is valid, is a directory then select files in it:
        if (@is_dir($readPath))    {

                // Getting all HTML files in the directory:
             $template_files = t3lib_div::getFilesInDir($readPath,'html,htm',1,1);

                // Start up the HTML parser:
            $parseHTML = t3lib_div::makeInstance('t3lib_parseHTML');

                // Traverse that array:
            foreach($template_files as $htmlFilePath)    {
                // Reset vars:
                $selectorBoxItem_title='';
                $selectorBoxItem_icon='';
"class.tx_tmselect_addfilestosel.php" [noeol] 73L, 2931C                    
....
```

wenn mir wer helfen könnte wäre das toll
vielen dank
jörg

---

Quelle: „Template erstellung nach typo3.org part2“, typo3.net, https://www.typo3.net/d/9053-template-erstellung-nach-typo3org-part2
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
