[Typo3-dev] change default sorting of MySQL WHERE - IN

Sacha Vorbeck sachav at gmx.net
Fri Sep 2 09:11:07 CEST 2005


Hi,

> Explode the array via t3lib_div::trimExplode.
> Make single SQL Calls.
> Write them to an array.
> 
> Not cool but the only way (i know of)

thanks for your hints. By now I think I don`t really need the MySQL
query any more.

Background:
the section index doesn`t work properly with TemplaVoila!. But there is
a workaround: http://bugs.typo3.org/view.php?id=465

Unfortunately this only works if you fill the register within the DS so
you can only access the register from within the content field defined
in the DS. Inserting tt_content.menu.20.3 as a content element works but
if you want to include the section index via a TS object defined in your
TS-template you can`t access the register. (You also can`t use treelevel
conditions in the TypoScript sections within a page-DS) That`s why Ingo
and I created a mini extension that reads the content-element uids from
the tx_templavoila_flex field of the current page. As this field can
contain UIDs of content-elements that are not valid (e.g. someone
deleted them in the LIST-view) we filtered the uids with a select query
+ enabledfields.

But as the section index is build with a record object:

lib.sectionindex = COA
lib.sectionindex {
  10 < plugin.tx_mfctvsectionindex_pi1
  # "Section index (pagecontent w/Index checked)"
  20 = RECORDS
  20 {
    source.cObject < plugin.tx_mfctvsectionindex_pi2
    tables = tt_content
    ....

The uids are then filtered anyway. So the additional MySQL query is not
really necessary.

Not nice but it works.

-- 
have a nice day and weekend,
  Sacha




More information about the TYPO3-dev mailing list