[TYPO3] Edit panels in records List
Christopher Torgalson
bedlamhotel at gmail.com
Fri Jan 5 21:57:55 CET 2007
Hi,
On 1/5/07, Tim Boesenkool <boesenkool at gmail.com> wrote:
> I've just watched all the videos again and I don't see any reference
> to the FE edit panels. I've rebuit a couple test extensions and no it
> doesn't seem to automatically add the FE edit panels. I know that they
> do work on this site as there are other kickstarter extensions that
> display the FE edit panels.
> I've gone through and analysed the other extensions and (not being a
> coder by nature) can't seem to locate where in the extension or the
> system that you dictate for edit panels to show. I'm sure its
> something reasonably simple and will be an 'aha' moment once i get it
> fixed.
> Any other ideas where i might look.
I can't search the videos at the moment, but the kickstarter CERTAINLY
sets up edit panels automatically. If you create a plugin with the
kickstarter, the function for single record view looks like this (the
editpanel stuff is the same in the list functions, this is simply more
concise):
/**
* Display a single item from the database
*
* @param string $content: The PlugIn content
* @param array $conf: The PlugIn configuration
* @return HTML of a single database entry
*/
function singleView($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
// This sets the title of the page for use in indexed
search results:
if ($this->internal['currentRow']['title'])
$GLOBALS['TSFE']->indexedDocTitle=$this->internal['currentRow']['title'];
$content='<div'.$this->pi_classParam('singleView').'>
<H2>Record "'.$this->internal['currentRow']['uid'].'" from
table "'.$this->internal['currentTable'].'":</H2>
<table>
<tr>
<td nowrap="nowrap"
valign="top"'.$this->pi_classParam('singleView-HCell').'><p>'.$this->getFieldHeader('test').'</p></td>
<td
valign="top"><p>'.$this->getFieldContent('test').'</p></td>
</tr>
<tr>
<td
nowrap'.$this->pi_classParam('singleView-HCell').'><p>Last
updated:</p></td>
<td valign="top"><p>'.date('d-m-Y
H:i',$this->internal['currentRow']['tstamp']).'</p></td>
</tr>
<tr>
<td
nowrap'.$this->pi_classParam('singleView-HCell').'><p>Created:</p></td>
<td valign="top"><p>'.date('d-m-Y
H:i',$this->internal['currentRow']['crdate']).'</p></td>
</tr>
</table>
<p>'.$this->pi_list_linkSingle($this->pi_getLL('back','Back'),0).'</p></div>'.
$this->pi_getEditPanel();
return $content;
}
--
Christopher Torgalson
More information about the TYPO3-english
mailing list