首页 文章

TYPO3 Extbase后端模块TypoScript for Fluid布局未加载

提问于
浏览
1

在TYPO3 CMS 6.2.17中,我使用Extension Builder创建了一个具有前端插件和后端模块的Extbase扩展 . 我构建了一个有两个页面的localhost网站:id = 1是标准页面;和id = 2是一个文件夹 . 标准页面具有站点的根TypoScript模板,该模板包含我的扩展的静态文件 .

我在Web模块中激活了我的Extbase扩展 . 当我选择我的扩展名和文件夹页面(id = 2)时,我看到了默认控制器和操作的填充列表显示;但是显示器使用的是前端Fluid布局,而不是后端布局 . 我想在“typo3-docheader-functions”div类中使用Fluid actionMenu的后端布局 .

我似乎无法获得显示器的后端Fluid布局 . 我选择了标准页面(按预期显示空列表显示)甚至是站点根页面(id = 0)(也是空列表显示),但它们也都使用了前端Fluid布局 .

我在扩展管理器中已停用并重新激活了我的扩展程序 . 我已尝试在TYPO3 Extbase backend module. Template path issue甚至TYPO3 4.5 extbase test backend module中建议的解决方案 . 到目前为止没有任何工作 . 我've even gone through the site' s安装工具"all configuration"设置,但没有看到我认为可能会影响后端显示问题 .

代码直接来自Extension Builder,但这里有一些摘录 .

ext_tables.php:

if (TYPO3_MODE === 'BE') {

    /**
     * Registers a Backend Module
     */
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
        'MyVendor.' . $_EXTKEY,
        'web',
        'myextbe',  // Submodule key
        '',                     // Position
        array(
            'Import' => 'list, show, new, create, edit, update, delete',
            'Pages' => 'list, show',
        ),
        array(
            'access' => 'user,group',
            'icon'   => 'EXT:' . $_EXTKEY . '/ext_icon.gif',
            'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_myextbe.xlf',
        )
    );

}

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'My Ext');

myext \配置\ Typo脚本\ constants.txt:

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

myext \配置\ Typo脚本\ SETUP.TXT:

# Module configuration
module.tx_myext_myextbe {
    persistence {
        storagePid = {$module.tx_myext_myextbe.persistence.storagePid}
    }
    view {
        templateRootPath = {$module.tx_myext_myextbe.view.templateRootPath}
        partialRootPath = {$module.tx_myext_myextbe.view.partialRootPath}
        layoutRootPath = {$module.tx_myext_myextbe.view.layoutRootPath}
    }
}

1 回答

  • 4

    将所有 module.tx_myext_myextbe 替换为 module.tx_myext 并将 plugin.tx_myext_myextfe 替换为 plugin.tx_myext .

    module.tx_myext_myextbe 在6.2.x中是无效的表示法 - 在结果中Extbase找不到它并尝试默认的模板路径

    constants.txt

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

    setup.txt

    module.tx_myext {
        persistence {
            storagePid = {$module.tx_myext.persistence.storagePid}
        }
        view {
            templateRootPath = {$module.tx_myext.view.templateRootPath}
            partialRootPath = {$module.tx_myext.view.partialRootPath}
            layoutRootPath = {$module.tx_myext.view.layoutRootPath}
        }
    }
    

    TypoScript Object browser

    [module]
      [tx_myext]
       [view]
        [templateRootPath] = EXT:myext/Resources/Private/Backend/Templates/
        [partialRootPath] = EXT:myext/Resources/Private/Backend/Partials/
        [layoutRootPath] = EXT:myext/Resources/Private/Backend/Layouts/
    

相关问题