0

ここに画像の説明を入力

だから、TYPO3 cms でカスタム ユーザー関数 (php スクリプト) を実行しています。SQL でデータを取得しています。1 つのページからすべてのコンテンツを取得しようとしています。

ページの pid を使用して tt_content からデータを取得することで簡単に行うことができますが、1 つのプラグイン コンテンツ要素 (図の 1 の下の要素) と text&img コンテンツ要素 (図の 2 の下の要素) の間のデータベース関係は何ですか?

それらが両方とも Google マップ コンテナの下にあることがわかるように、それらを DB にリンクするにはどうすればよいですか?

どうもありがとう!

4

1 に答える 1

1

TemplaVoila stores tt_content uids (and their order) in table pages - in field tx_templavoila_flex, it's standard XML

To fetch all elements from given page you need to fetch that XML and read value with vDEF index from required column (as a common XML node). Uid's of tt_content elements are comma divided, so when you'll read ths node you just need to use explode by comma to get an array in proper order. sample:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3FlexForms>
   <data>
       <sheet index="sDEF">
           <language index="lDEF">
               <field index="field_leftcolumn">
                   <value index="vDEF">284,190,221</value>
               </field>
               <field index="field_rightcolumn">
                   <value index="vDEF">134,130</value>
               </field>
            </language>
       </sheet>
   </data>
</T3FlexForms>

You can check how to work with these XML structures in... TemplaVoila source code, for an example it's probably easiest to convert the XML to PHP array:

$flexformContentArr = t3lib_div::xml2array($row['tx_templavoila_flex']);

@see: typo3conf/ext/templavoila/class.tx_templavoila_api.php line #1362

于 2013-01-12T22:49:45.230 に答える