---
title: "renderMode tree"
url: "https://www.typo3.net/d/112847-rendermode-tree"
source: "typo3.net"
tags: ["Extensions","Entwicklung","Frage"]
created: "2012-11-19"
last_reply: "2012-11-26"
replies: 2
solved: false
page: 1
pages: 1
lang: "de"
---

# renderMode tree

Extensions › Entwicklung · 2 Antworten · gestartet 2012-11-19

## Eröffnungsbeitrag

**hardcoder** · 2012-11-19 · [Beitrag #1](https://www.typo3.net/d/112847-rendermode-tree/1)

Hallo Community,

ich habe ein Problem mit TCA -> select -> renderMode -> tree. Es wird nur roodUid gezeigt. Ich habe festgestellt das:

$this->itemWhiteList

in

t3lib/tree/tca/class.t3lib_tree_tca_databasetreedataprovider.php (Typo3 4.5.22)

leer ist.

ändere ich entsrp. Bedingung (Z. 386) in der unten gezeigten Funktion, bekomme ich mein gewünschtes Ergebnis.

```php
	protected function getRelatedRecords(array $row) {
		if ($this->getLookupMode() == t3lib_tree_tca_DatabaseTreeDataProvider::MODE_PARENT) {
			$children = $this->getChildrenUidsFromParentRelation($row);
		} else {
			$children = $this->getChildrenUidsFromChildrenRelation($row);
		}

		$allowedArray = array();
		foreach ($children as $child) {
			if (!in_array($child, $this->idCache) && in_array($child, $this->itemWhiteList)) {
				$allowedArray[] = $child;
			}
		}

		$this->idCache = array_merge($this->idCache, $allowedArray);

		return $allowedArray;
	}
```

wie befülle ich die Whitelist?

## Antworten

### [#2](https://www.typo3.net/d/112847-rendermode-tree/2) · hardcoder · 2012-11-22

> **hardcoder schrieb:**
>
> wie befülle ich die Whitelist?

Es ist wie "früher" ... man beantwortet immer noch  seine Fragen meinst selbst (überlege kurz ob ich meine Lösung posten soll ...):

<http://cweiske.de/tagebuch/typo3-record-on-root-page.htm>

### [#3](https://www.typo3.net/d/112847-rendermode-tree/3) · hardcoder · 2012-11-26

Falls der obige link "das Zeitliche gesegnet" hat:

> Writing a TYPO3 extension, I needed to allow records of a certain table to be created on TYPO3's root page (pid=0). While the solution is easy, it took me a while to find it.
>
> In ext_tables.php, add a rootLevel setting to your table's ctrl array:
>
> ```php
> $TCA['static_countries'] = array(
>     'ctrl' => array(
>         'title'     => 'Countries',
>         'label'     => 'cn_short_en',
>         'rootLevel' => 1,
>     ...
> /*
>
> TYPO3 allows three settings here: 0, 1 and -1, which are described in the Core API documentation:
>
> rootLevel = 0
> Records may only exist in the page tree, not in the root.
> rootLevel = 1
> Records may only exist in the root, not on the page tree. Note that only admins may edit records in the root page.
> rootLevel = -1
> Records may exist in both the root and the page tree.
> */
> ```

---

Quelle: „renderMode tree“, typo3.net, https://www.typo3.net/d/112847-rendermode-tree
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
