locallang.xml im pi1 Verzeichnis.
Ich habe mit dem Tutorial im Kickstarter die "Mitarbeiter-Extension" erstellt und es auch hinbekommen experimentell die singleview zu modifizieren.
ich würde nun aber auch gern den listview verändern und da fangen meine Probleme an. Ich würde gern verschiedene Modi ermöglichen die die vorhandenen einträge filtern und so nur jeweils bestimmte Einträge anzeigen.
Das müsste doch über "mode" gehen?
Wie kann ich Mode 1 bis Mode 3 die per default angezeigt werden umzubennenen? In der class.tx_tkmitarbeiter_pi1.php?
?PHP-Code:'1'=> $this->pi_getLL('list_mode_1','Modegeändert 1'),
Vielen Dank im Voraus!
PHP-Code:function listView($content,$conf) {
$this->conf=$conf; // Setting the TypoScript passed to this function in $this->conf
$this->pi_setPiVarDefaults();
$this->pi_loadLL(); // Loading the LOCAL_LANG values
$lConf = $this->conf['listView.']; // Local settings for the listView function
if ($this->piVars['showUid']) { // If a single element should be displayed:
$this->internal['currentTable'] = 'tx_tkmitarbeiter_personen';
$this->internal['currentRow'] = $this->pi_getRecord('tx_tkmitarbeiter_personen',$this->piVars['showUid']);
$content = $this->singleView($content,$conf);
return $content;
} else {
$items=array(
'1'=> $this->pi_getLL('list_mode_1','Mode 1'),
'2'=> $this->pi_getLL('list_mode_2','Mode 2'),
'3'=> $this->pi_getLL('list_mode_3','Mode 3'),
);
if (!isset($this->piVars['pointer'])) $this->piVars['pointer']=0;
if (!isset($this->piVars['mode'])) $this->piVars['mode']=1;
// Initializing the query parameters:
list($this->internal['orderBy'],$this->internal['descFlag']) = explode(':',$this->piVars['sort']);
$this->internal['results_at_a_time']=t3lib_div::intInRange($lConf['results_at_a_time'],0,1000,3); // Number of results to show in a listing.
$this->internal['maxPages']=t3lib_div::intInRange($lConf['maxPages'],0,1000,2);; // The maximum number of "pages" in the browse-box: "Page 1", "Page 2", etc.
$this->internal['searchFieldList']='name,vorname';
$this->internal['orderByList']='uid,name,vorname';
// Get number of records:
$res = $this->pi_exec_query('tx_tkmitarbeiter_personen',1);
list($this->internal['res_count']) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
// Make listing query, pass query to SQL database:
$res = $this->pi_exec_query('tx_tkmitarbeiter_personen');
$this->internal['currentTable'] = 'tx_tkmitarbeiter_personen';
// Put the whole list together:
$fullTable=''; // Clear var;
# $fullTable.=t3lib_div::view_array($this->piVars); // DEBUG: Output the content of $this->piVars for debug purposes. REMEMBER to comment out the IP-lock in the debug() function in t3lib/config_default.php if nothing happens when you un-comment this line!
// Adds the mode selector.
$fullTable.=$this->pi_list_modeSelector($items);
// Adds the whole list table
$fullTable.=$this->pi_list_makelist($res);
// Adds the search box:
$fullTable.=$this->pi_list_searchBox();
// Adds the result browser:
$fullTable.=$this->pi_list_browseresults();
// Returns the content from the plugin.
return $fullTable;
}
}
locallang.xml im pi1 Verzeichnis.
Danke!
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
Lesezeichen