How to change the selected entry in TYPO3 pagetree -
How to change the selected entry in TYPO3 pagetree -
i making backend extension that, changes page working on upon clicking link in work area right of pagetree. problem is: pagetree doesn't update according id presented in work area.
the id changed passing query parameter id mod.php-module, , works expected. have tried updating page tree via
t3lib_befunc::openpagetree($this->id); t3lib_befunc::setupdatesignal('updatepagetree');and later
<script type="text/javascript">'.t3lib_befunc::getupdatesignalcode().'</script>to included in output. works (the pagetree refreshed, , hidden subpages of passed id revealed), except greyness indicating current page in page tree left @ previous position.
any thought how create pagetree reflect new $this->id
?
here's how did it. in php code of module, called openpagetree
so:
t3lib_befunc::openpagetree(76,false);
i did not phone call setupdatesignal
because whole "update signal" process felt bit weird me. please note openpagetree
has sec parameter, required.
to understanding, phone call should sufficient set state of tree in user session server-side. comes client side.
in javascript code of extension, select appropriate page id , that's it:
<script type="text/javascript"> if (top && top.typo3.backend.navigationcontainer.pagetree) { top.typo3.backend.navigationcontainer.pagetree.select(76); } </script>
while looking through source of page tree, realized select top.fsmod.recentids['web']
after refresh. sadly, wasn't able determine how inject value there. seemed me value supposed adjusted through user interaction (meaning, user clicked on node in page tree).
typo3
Comments
Post a Comment