2016-05-06 9 views
1

TYPO3 CMS 6.2.17では、エクステンションビルダを使用してフロントエンドプラグインとバックエンドモジュールを持つExtbaseエクステンションを作成しました。私は2つのページを持つlocalhostウェブサイトを構築しました。id = 1は標準ページです。 id = 2はフォルダです。標準ページにはサイトのルートTypoScriptテンプレートがあり、そのテンプレートには自分の拡張機能の静的ファイルが含まれています。TYPO3 ExtbaseバックエンドモジュールFluidレイアウトのTypoScriptがロードされない

WebモジュールでExtbase拡張機能を有効にしました。拡張機能とフォルダページ(id = 2)を選択すると、既定のコントローラとアクションからの表示されたリストが表示されました。ディスプレイはバックエンドのレイアウトではなくフロントエンドのFluidレイアウトを使用していました。 "typo3-docheader-functions" divクラスのFluid actionMenuのバックエンドレイアウトが必要です。

ディスプレイのバックエンド流体レイアウトを取得できないようです。標準ページ(空のリスト表示を期待通りに)とサイトルートページ(id = 0)(空のリスト表示も)を選択しましたが、どちらもフロントエンドのFluidレイアウトも使用しています。

すべてのキャッシュをクリアし、インストールツールでtypo3temp /を消去しました。 Extension Managerで拡張機能を無効にして再度有効にしました。私はTYPO3 Extbase backend module. Template path issueとさらにTYPO3 4.5 extbase test backend moduleで提案された解決策を試しました。これまでに何も働いていません。私はサイトのインストールツールの "すべての設定"の設定を行ったことがありますが、私はバックエンドの表示の問題に影響する可能性があるとは思っていませんでした。

コードは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 \構成\のTypoScript \ 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 \構成\のTypoScript \ 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} 
    } 
} 

答えて

3

置き換えすべてmodule.tx_myext_myextbe~module.tx_myextおよびplugin.tx_myext_myextfe~plugin.tx_myext。結果にExtbaseはそれを見つけることができないとフロントエンド1

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 
    } 
} 

設定で、デフォルトのテンプレートパスを試みる -

module.tx_myext_myextbeは6.2.xの中に無効な表記法であります.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オブジェクトブラウザ

[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/ 
+0

これは機能しました。私はExtension BuilderのTypoScriptビルドを信頼していましたが、 'plugin.tx_myext'と' module.tx_myext'のTypoScript表記をチェックすることさえ考えていませんでした。 – Andrew

+0

「実験」はもう少し前に2日間の欲求不満を抱えていました;)それはあなたを助けてくれたことを嬉しく思います。 – biesior

+1

TYPO3 6.2以降のすべてのプロジェクトで、 'templateRootPaths'など(複数の「s」に注意)に切り替えてください。特異なパス形式は、おそらくサポートされていますが、完全に非難されています。 6.2の例は正しいですが、それ以降ではありません! –

関連する問題