[TYPO3-mvc] Fluidtemplate and settings
Thomas Skierlo
pubtsk1 at pix-pro.eu
Fri Sep 21 12:04:46 CEST 2012
Hello again,
I am currently trying to use the FLUIDTEMPLATE object for my page
layout, which is working fine as long as I pass everything that might be
needed later as variables. This is perfectly ok for any kind of content,
which really is "variable". Besides that I need some data which is site
specific, like $startUid, $searchUid, to use it in my templates or view
helpers, like "do something on the start page only".
So I tried to pass them via TS setup and constants:
plugin.tx_portable_layout {
view {
templateRootPath = EXT:portable_layout/Resources/Private/Templates/
partialRootPath = EXT:portable_layout/Resources/Private/Partials/
layoutRootPath = EXT:portable_layout/Resources/Private/Layouts/
}
persistence {
storagePid =
}
settings {
rootUid = 1
startUid = 2
searchUid = 3
}
}
I added this to my ext_tables.php:
t3lib_extMgm::addStaticFile($_EXTKEY,'Configuration/TypoScript', 'Portable Layout');
I expected to be able to access settings in my templates as
{settings.rootUid}, but I can't. Template/Layout/Partials pathes are
used from my setup/constants. How do I assign my settings to be
available in the view? Do I need a basic controller (without any model)
just to assign those settings?
Thanks for any help,
Thomas
More information about the TYPO3-project-typo3v4mvc
mailing list