---
title: "Paging innerhalb einer Extension"
url: "https://www.typo3.net/d/51409-paging-innerhalb-einer-extension"
source: "typo3.net"
tags: ["Extensions","Entwicklung","Frage"]
created: "2006-10-10"
last_reply: "2006-10-10"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# Paging innerhalb einer Extension

Extensions › Entwicklung · 0 Antworten · gestartet 2006-10-10

## Eröffnungsbeitrag

**cooper** · 2006-10-10 · [Beitrag #1](https://www.typo3.net/d/51409-paging-innerhalb-einer-extension/1)

Hallo,

anhand des Tutorial "Basic Player Profile" [url <http://typo3.org/documentation/document-library/tutorials/player_profile_basic/current/>][/url] hab ich mir meine erste kleine Extension gebastelt. Endlich werden auch die Bilder angezeigt und alle Einträge werden untereinander ausgegeben, wunderbar...

Nun möchte ich aber das pro Seite nur 10 Elemente ausgegeben werden und man dann durch die Datensätze browsen kann. Also ein Paging einbauen. Wie läuft das innerhalb der Extension? In Kaspers Video sieht das Innenleben der Extension wieder ganz anders aus.

Meine Extension bisher (Auszug):

```php
function main($content,$conf)	{                                                 
		$this->conf = $conf;
		$this->pi_setPiVarDefaults();
		$this->pi_loadLL();
		
        $content = "";
        $GLOBALS["TSFE"]->set_no_cache();
        $rows=$this->getItems();
        while(list($c,$row) = each($rows)){
            $this->conf["image."]["file"] = "uploads/tx_ext/".$row["bild"];
            $theImgCode = $this->cObj->IMAGE($this->conf["image."]);
            $content .= $theImgCode."<br />";
            $content .= "<strong>".$row["hundeschule"]."</strong><br />";       
            $content .= "<hr /><br />"; 
        } 
		return $this->pi_wrapInBaseClass($content);
	}
    
function getItems(){       
        $config["pid_list"] = trim($this->cObj->stdWrap($this->conf["pid_list"],$this->conf["pid_list."]));
        $config["pid_list"] = $config["pid_list"] ? implode(t3lib_div::intExplode(",",$config["pid_list"]),",") : $GLOBALS["TSFE"]->id;
        list($pid) = explode(",",$config["pid_list"]);
        $query = "SELECT * FROM tx_ext WHERE hidden = 0 ORDER BY sorting";
        $res = mysql(TYPO3_db,$query);
        $out=array();
        while($row = mysql_fetch_assoc($res)){
            $out[]=$row;
        }
        return $out;
    }
```

---

Quelle: „Paging innerhalb einer Extension“, typo3.net, https://www.typo3.net/d/51409-paging-innerhalb-einer-extension
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
