2017-02-23 8 views
1

TYPO3を7.6から8.6にアップグレードしました。 今、私はstyle.content.getで変数を設定できません。私のルートテンプレートはfluid_styled_contentを読み込みます。 いくつかのソース:TYPO3流体変数

page.10 = FLUIDTEMPLATE 
page.10 { 
    partialRootPath ={$resDir}/Private/Partials 
    layoutRootPath = {$resDir}/Private/Layouts 

    variables { 
     contentMain < styles.content.get 
     contentMain.select.where = colPos = 0 
     contentnew < styles.content.get 
     contentnew.select.where = colPos = 1 
     contentkat < styles.content.get 
     contentkat.select.where = colPos = 2 

     test = TEXT 
     test.value = loool 
    } 
} 

表示変数:

<f:format.raw> {contentMain} </f:format.raw> 
<f:format.raw> {contentnew} </f:format.raw> 
<f:format.raw> {contentkat} </f:format.raw> 
<f:format.raw> {test} </f:format.raw> 

答えて

2

styles.content.getがEXTに定義されています。fluid_styled_contentが、非常に遅く、ほとんどのコピーが空であるようにします。 colPosの変更がすべての参照に適用されるため、参照は解決策ではありません。

現時点で最善の解決策は、初期のあなたのTSでstyles.content.getの独自の定義のようだ:

styles.content.get = CONTENT 
styles.content.get { 
    table = tt_content 
    select { 
     orderBy = sorting 
     where = colPos=0 
    } 
} 

が、それは独自の定義であるとして、それがあるので、私はtemp.content.getに名前を変更します私自身のバージョン(ノー混乱グローバル定義が変更された場合)

0

として同定は、ベルントへ 感謝を解決しよう!この問題を解決しました。ここで フル例:

mystyles.content.get = CONTENT 
mystyles.content.get { 
    table = tt_content 
    select { 
     orderBy = sorting 
     where = colPos=0 
    } 
} 


page.10 = FLUIDTEMPLATE 
page.10 { 
    partialRootPath ={$resDir}/Private/Partials 
    layoutRootPath = {$resDir}/Private/Layouts 

    variables { 
     contentMain < mystyles.content.get 
     contentMain.select.where = colPos = 0 
     contentnew < mystyles.content.get 
     contentnew.select.where = colPos = 1 
     contentkat < mystyles.content.get 
     contentkat.select.where = colPos = 2 

     test = TEXT 
     test.value = loool 
    } 
} 
+0

私の解決方法であなたの決定である – Gang

+1

あなた自身の答えを削除することをお勧めします。私は 'temp.content 'の使用を提案しました。 「temp.」で始まるすべてのTSオブジェクトがレンダリング実行前に削除され、より小さな構成アレイが得られるので、「取得」する。特にコピーされたプロトタイプの場合、レンダリング時に知る必要はありません。 –

1

TYPO3 8.6のバグがあります:あなたはvariablesからstyles.content.getを割り当てる前https://forge.typo3.org/issues/80044

これを追加します。 <INCLUDE_TYPOSCRIPT: source="FILE:EXT:frontend/ext_typoscript_setup.txt"> 次に、あなたが以前と同じようにそれを使用することができますが。

関連する問題