TYPO3 v7.6 extBase backend module template path not working

无人久伴 提交于 2019-12-12 18:22:46

问题


I have created extBase extension using extension_builder. Everything is fine but backend module path not working.
- constants.txt

module.my_ext {
    view {
        templateRootPath = EXT:my_ext/Resources/Private/Backend/Templates/
        partialRootPath = EXT:my_ext/Resources/Private/Backend/Partials/
        layoutRootPath = EXT:my_ext/Resources/Private/Backend/Layouts/
    }
}

-setup.txt

module.my_ext {
    view {
        templateRootPath = {$module.my_ext.view.templateRootPath}
        partialRootPath = {$module.my_ext.view.partialRootPath}
        layoutRootPath = {$module.my_ext.view.layoutRootPath}
    }
}

I have clear:
- Install tool cache
- BE cache
- Even removed entire typo3temp folder

I have included static template in my root template

But, it still consider FE template view
Please assist me, where I did mistake or is it core issue?
Thank you.


回答1:


I have found solution from here issue#66306 Thank you Henri Nathanson

In version v7x

templateRootPath = EXT:my_ext/Resources/Private/Backend/Templates/

will not work, because Extbase does not now about

templateRootPath

anymore. The default Extbase-Folder-Configuration is used instead. This is the same for

templateRootPaths

because this is no array value.

So what does work is:

module.my_ext {
    view {
        templateRootPaths.0 = {$module.my_ext.view.templateRootPath}
        partialRootPaths.0 = {$module.my_ext.view.partialRootPath}
        layoutRootPaths.0 = {$module.my_ext.view.layoutRootPath}
    }
}

Perhaps there is a way to determine, which form of variables the current systems understands and then use such variable.




回答2:


this is a known bug

https://forge.typo3.org/issues/64539

what should i say else 30 Characters are needed




回答3:


I faced same problem.

TypoScript path is correct, the problem was I have added same key in frontend and backend module.

Changed the frontend and backend module key. that works for me.

Try to give different key sometimes that works too. :)



来源:https://stackoverflow.com/questions/33768503/typo3-v7-6-extbase-backend-module-template-path-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!