2017-08-03 1 views
0

私は次のようにしたいと考えています: 私は新しいコンテンツ要素 "テキストメディア"を作成しています。また、「カテゴリ」タブで選択したカテゴリも作成しました。 ここでは、これらの選択したカテゴリを流体テンプレートに統合して、javascriptフィルタとして機能させたいと考えています。TYPO3テキストメディア要素は、選択したシステムカテゴリからクラスを取得する必要があります

このタスクをどのように達成できますか?

ありがとうございます!

答えて

0

DataProcessorを使用してカテゴリデータを取得できます。あなたはtextmedia要素のTypoScriptを拡張する必要があります。

カテゴリーの例:https://git.spooner.io/spooner/just_news/blob/master/Configuration/TypoScript/RenderingDefinitions/news_list.ts#L23

データプロセッサのドキュメント:

# Text & Media: 
# Any number of media wrapped right around a regular text element. 
# 
# CType: textmedia 

tt_content.textmedia =< lib.contentElement 
tt_content.textmedia { 
templateName = Textmedia 
    dataProcessing { 
     10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 
     10 { 
      references.fieldName = assets 
     } 
     20 = TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor 
     20 { 
      maxGalleryWidth = {$styles.content.textmedia.maxW} 
      maxGalleryWidthInText = {$styles.content.textmedia.maxWInText} 
      columnSpacing = {$styles.content.textmedia.columnSpacing} 
      borderWidth = {$styles.content.textmedia.borderWidth} 
      borderPadding = {$styles.content.textmedia.borderPadding} 
     } 
     # Get categories 
     30 = TYPO3\CMS\Frontend\DataProcession\DatabaseQueryProcessor 
     30 { 
      put the login in... 
     } 
    } 
    stdWrap { 
     editIcons = tt_content: header [header_layout], bodytext, assets [imageorient|imagewidth|imageheight], [imagecols|imageborder], image_zoom 
     editIcons { 
      iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.textmedia 
     } 
    } 
} 
:ここ https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Fluidtemplate/Index.html#dataprocessing

デフォルトtextmedia TS、追加オブジェクト30を見ることができます

関連する問題