TYPO3 11.5.2
- I want to display felogin using typoscript with a customized template at position:
<f:cObject typoscriptObjectPath="lib.loginBox" /> - The original template should be used if felogin is added as a page content element.
The following code works, but changes the view for all felogins:
plugin.tx_felogin_login {
settings.pages = 15
view {
templateRootPaths {
0 = fileadmin/template/current/felogin/Resources/Private/Templates/
10 = {$plugin.tx_felogin_login.view.templateRootPath}
}
}
}
lib.loginBox = USER
lib.loginBox {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Felogin
pluginName = Login
}
To apply different templates for 1) and 2) I thought the following could work, but it doesn't:
lib.loginBox = USER
lib.loginBox {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Felogin
pluginName = Login
settings < plugin.tx_felogin_login.settings
settings.pages = 15
view < plugin.tx_felogin_login.view
view {
templateRootPaths {
0 = fileadmin/template/current/felogin/Resources/Private/Templates/
10 = {$plugin.tx_felogin_login.view.templateRootPath}
}
}
}
EDIT: the second version does not use the custom template at all and the settings.pages = 15 doesn't work => no login possible. With the first version login is working.
Any hints what's wrong with this approach? How I can achieve different templates for 1) and 2) ?
Edit: Solution as it works for me now:
plugin.tx_felogin_login {
settings.pages = 15
}
lib.loginBox = USER
lib.loginBox {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Felogin
pluginName = Login
view < plugin.tx_felogin_login.view
view {
templateRootPaths {
10 = {$plugin.tx_felogin_login.view.templateRootPath}
#20 = fileadmin/template/current/felogin/Resources/Private/Templates/
#should be something like:
20 = EXT:myfelogin/Resources/Private/Templates/
}
}
}