[TYPO3-dev] Dynamically load TS/CSS/JS/HTML based on the new backend layout
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Tue Mar 22 00:33:14 CET 2011
Franz Koch wrote:
> You can still use this concept, but you would need to use a hook.
I'd prefer avoiding a hook, after I had a look at it again.
To have the most flexibility, it would be great to somehow
have a condition, checking the actual selected layout on the
current page.
A quote from Joey Hasenau:
(http://news.typo3.org/news/article/the-grid-view-a-new-concept-for-a-backend-that-matches-your-layout/)
"Maybe we should check the selected backend_layout as soon as there are
backend_layout records available and put the resulting ID into the TSFE
just like we already do it with other values. This way you could easily
use a condition like
[globalVar = TSFE:selected_backend_layout=1]
What do you think?"
That would exactly solve what I need, and I was wondering if
there is a way currently to mimic the mentioned condition?
I tried to use a user function, like this:
[userFunc = user_backend_layout(1)]
[global]
But the problem I faced, is that in the function itself, which is
defined in the ext_localconf.php file, the $GLOBALS['TSFE']->cObj
is not yet defined, so I can't fetch the layouts of the current page.
Is there maybe a way to set "TSFE:selected_backend_layout" myself?
Maybe there is a place to call a hook which would set this?
Thanks a lot for any help on this!
Regards,
Thomas
More information about the TYPO3-dev
mailing list