[TYPO3-ttnews] FE editing: Insert new record if list is empty
Frank Frewer
f.frewer at klakoo.de
Fri Oct 13 16:22:15 CEST 2006
Hello,
I didn't found the possibility for FE Editors, to insert a new record,
if there is not another record.
So I made little changes to class.tx_ttnews.php and now it works.
in function displayList I changed one of the last rows:
$content .=
$this->local_cObj->stdWrap($this->pi_getLL('noNewsToListMsg'),
$this->conf['noNewsToListMsg_stdWrap.']);
my version:
$content .=
$this->local_cObj->stdWrap($this->pi_getLL('noNewsToListMsg').$this->pi_getEditPanel('','','',$this->conf['noNewsToListMsg_stdWrap.']['editPanel.']),
$this->conf['noNewsToListMsg_stdWrap.']);
In the typoscript of the page with the tt_news module "LIST" I added:
plugin.tt_news {
noNewsToListMsg_stdWrap = 1
noNewsToListMsg_stdWrap.editPanel {
line=0
label = new entry
onlyCurrentPid = 0
previewBorder=4
newRecordFromTable = tt_news
newRecordInPid = [myPid]
}
}
That's all. Maybe somebody is interested ...
Regards
Frank
More information about the TYPO3-project-tt-news
mailing list