2013-03-11 7 views
6

I( 'メートル)S(T)UCKでボーダー列から現在のページの画像をレンダリング; - )TYPO3 6.0:FAL

私は、次のスニペットを持っていると私はそれが仕事を得ることはありません。

COL3 = FILES 
COL3 { 
     references { 
      table = tt_content 
      uid = 14 
      fieldName = image 
     } 
     renderObj = TEXT 
     renderObj { 
      data = file:current:publicUrl 
      wrap = <img src="|"> 
     } 
} 

は、スニペットは、これまでに動作しますが、私は、現在のページと同様& colPos = 3だから、何か、それを使用したい:私はほとんどすべてを試みたように感じる

table = tt_content 
select { 
    where = colPos = 3 
    orderBy = sorting 
    languageField = sys_language_uid 
} 

を。

私は本当に私が...

感謝の多くを得ることができるすべての助けに感謝!

答えて

4

selectの属性がreferencesで機能しないとします。
コンテンツ要素で使用する(テストされていない)このソリューションをお試しください。

... 
references { 
    table = tt_content 
    uid.data = uid 
    fieldName = image 
} 

もう一つのアイデア:

COL3 = CONTENT 
COL3 { 
    table = tt_content 
    select { 
     where = colPos = 3 
    } 

    renderObj = FILES 
    renderObj { 
      references { 
       table = tt_content 
       fieldName = image 
      } 
      renderObj = TEXT 
      renderObj { 
       data = file:current:publicUrl 
       wrap = <img src="|"> 
      } 
     } 
    } 
+1

あなたは私の一日保存しました!どうもありがとう。私はすでに最初のものを乾燥させましたが、それは私のためには機能しません - しかし、2番目のものは箱から出てきます!ありがとう。 – lufi

+0

偉大な - 私はテストしていない、それは私も誇りに思う:)。 – Mateng

7

だ私には良く聞こえる:

COL3 = CONTENT 
COL3 { 
    table = tt_content 
    select { 
     where = colPos = 3 
    } 

    renderObj = FILES 
    renderObj { 
      references { 
       table = tt_content 
       fieldName = image 
      } 
      renderObj = IMAGE 
      renderObj { 
       file.import.data = file:current:publicUrl 
      } 
     } 
    } 
+0

実際には画像にIMAGEオブジェクトが使用されているため、これはより良い解決策です。 – lorenz

関連する問題