[TYPO3-dev] How typo3 saves highlighted page in the page tree?
Tapio Markula
tapio.markula at atwebteam.com
Fri Dec 29 11:59:40 CET 2006
Benjamin Mack kirjoitti:
> Hey Tapio,
>
> since I'm working on some changes in this file, I know that the
pagetree script writes it as a Javascript parameter in the "top"-frame.
>
> "top.fsMod.navFrameHighlightedID[frameSetModule]"
Ok.
I get solved the problem related with resetting highlight to new page
I added to init() of XCLASS for alt_doc.php
if(isset($myGET['edit']['pages'])) {
$id=key($myGET['edit']['pages']);
if(isset($myGET['edit']['pages'][$id]['new']) || $myGET['PageWizard']) {
$pageMaxItem = mysql_query("SELECT
MAX(uid) FROM pages;",$GLOBALS['TYPO3_DB']->link);
$pageMaxItem=mysql_fetch_array($pageMaxItem);
$pageMaxItem=$pageMaxItem[0];
}
$this->doc->JScode .= ' <script
type="text/javascript">
var cookieStartHIL="pages'.$pageMaxItem.'_0";
top.fsMod.navFrameHighlightedID["web"]=cookieStartHIL
</script> ';
}
the parent frame has the function, which relate with
top.fsMod.navFrameHighlightedID["web"]=cookieStartHIL
and that can change the hightlight to desired page.
$myGET['PageWizard'] is an extra param for TemplaVoila's page wizard.
without that can't separate, which is normal edit mode and which relates
with the new page wizard - that is one problem in original TemplaVoila.
More information about the TYPO3-dev
mailing list