TYPO3常量设置后端启动视图

时间:2018-02-20 10:49:11

标签: typoscript typo3-extensions

我使用扩展构建器(exb)构建了一个带有后端模块的简单新扩展。
exb为

下的后端创建了不同的视图
  

../ Resources / Private / Backend / ...

但如果我启动后端,它不会使用后端文件夹下的视图。

在constant.ts

module.tx_hgaimage_hgaimagebe {
view {
    # cat=module.tx_hgaimage_hgaimagebe/file; type=string; label=Path to template root (BE)
    templateRootPath = EXT:hgaimage/Resources/Private/Backend/Templates/
    # cat=module.tx_hgaimage_hgaimagebe/file; type=string; label=Path to template partials (BE)
    partialRootPath = EXT:hgaimage/Resources/Private/Backend/Partials/
    # cat=module.tx_hgaimage_hgaimagebe/file; type=string; label=Path to template layouts (BE)
    layoutRootPath = EXT:hgaimage/Resources/Private/Backend/Layouts/
}
persistence {
    # cat=module.tx_hgaimage_hgaimagebe//a; type=string; label=Default storage PID
    storagePid =
}

}

在setup.ts中

module.tx_hgaimage_tools_hgaimagehgaimagebe {
persistence {
    storagePid = {$module.tx_hgaimage_hgaimagebe.persistence.storagePid}
}
view {
    templateRootPaths.0 = EXT:hgaimage/Resources/Private/Backend/Templates/
    templateRootPaths.1 = {$module.tx_hgaimage_hgaimagebe.view.templateRootPath}
    partialRootPaths.0 = EXT:hgaimage/Resources/Private/Backend/Partials/
    partialRootPaths.1 = {$module.tx_hgaimage_hgaimagebe.view.partialRootPath}
    layoutRootPaths.0 = EXT:hgaimage/Resources/Private/Backend/Layouts/
    layoutRootPaths.1 = {$module.tx_hgaimage_hgaimagebe.view.layoutRootPath}
}

}

不同之处在于,在设置中,工具和工具之间的每个路径定义都需要额外的.0。

两者都定义了../Backend/ ..但不使用此视图。

为什么在设置和常量中有非常类似的定义? 可能是什么问题,而不是使用后端下的观点?

1 个答案:

答案 0 :(得分:0)

没有使用../Backend/的问题。我解决了。在模板上添加“从扩展中包含静态”。

但为什么这些不同的设置是必要的?

相关问题