[TYPO3] [Extension and Wordspace] How it works ?
Sylvain Gourvil
sylvain.gourvil at mediasmart.fr
Thu Jun 7 12:37:14 CEST 2007
Hi all,
I am new with workspace and i do not understand how it works with my
extension in frontend.
I developped a news extension taht works.
Now I have to implement frontend preview for it.
Here's my code -- I took a look before to tt_news extension --
$singleWhere = 'tx_mediaactusop_news.uid=' .
intval($this->piVars['showUid']);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'*',
'tx_mediaactusop_news',
$singleWhere);
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
// get the translated record if the content language is not the
default language
if ($GLOBALS['TSFE']->sys_language_content) {
$OLmode = ($this->sys_language_mode ==
'strict'?'hideNonTranslated':'');
$row =
$GLOBALS['TSFE']->sys_page->getRecordOverlay('tx_mediaactusop_news.uid',
$row, $GLOBALS['TSFE']->sys_language_content, $OLmode);
}
if ($this->versioningEnabled) {
// get workspaces Overlay
$GLOBALS['TSFE']->sys_page->versionOL('tx_mediaactusop_news.uid',$row);
// fix pid for record from workspace
$GLOBALS['TSFE']->sys_page->fixVersioningPid('tx_mediaactusop_news.uid',$row);
}
But it never get my draft version when admin in draft with preview setted.
How do I manage this in FE ?
Thanks in advance and sorry for noob issue ^^
More information about the TYPO3-english
mailing list