Ah, hab's: bei select muss ein Korrektur her:

pidInList.field = uid

Dann wird es richtig gelesen!




Am 05.11.14 15:15, schrieb Robert Wildling:
Hi,

ich versuche im Boostrap-Package in der News-Listen-Ansicht das Datum
aus einem auf der jeweiligen Seite liegenden Datensatz (tt_content) zu
beziehen und nicht aus der page-Tabelle. Die Abfrage liefert aber kein
Ergebnis.

Hier mein TS:

# From the Bootstrap Package
# lib.newsheader < lib.stdheader
lib.newsheader {
  # Test: show pid and uid; this works -> both  values are shown
  13 = TEXT
  13.field = pid
  13.noTrimWrap = |PID: | - |
  14 = TEXT
  14.field = uid
  14.noTrimWrap = |UID: ||

  # This does NOT work!
  15 = CONTENT
  15 {
   table = tt_content
   select {
    # should the uid be recognized here?
    pidInList = uid
    # Date: colPos=10, Location: colPos=11
    where = colPos=10
   }
   renderObj = COA
   renderObj {
    10 = TEXT
    10 {
     field = bodytext
    }
   }
  }

  # Neither does this work (overriding of colPos not shown)
  #15 < styles.content.get
}


Auch wenn die DB-Abfrage im Menü-Script durcgeführt wird, werden keine
Werte zurückgeschickt:

tt_content.menu.20 {
  news {
   maxItems = {$page.theme.news.pagination.itemsperpage}
   1 {
    alternativeSortingField = sorting ASC
    NO {
     stdWrap2 {
      cObject {
       10 {
        # From The Original script
        #10 = < lib.stdHeader

        # my additions: here nothing happens at all
        #20 = CONTENT
        #20 {
        # table = tt_content
        #  select {
        #   pidInList = uid
        #   where = colPos=1
        #  }
        #  renderObj = COA
        #  renderObj {
        #   10 = TEXT
        #   10.field = bodytext
        #  }
        #  # a wrap as test
        #  wrap = WWW|WWW
        # }
        }
        20 {
         text {
          10 {
           # From the original script
           # 10 = < lib.newsheader
           # my additions: at least the test wrap is shown
           20 = CONTENT
           20 {
            table = tt_content
            select {
            pidInList = uid
            where = colPos=1
           }
           renderObj = COA
           renderObj {
            10 = TEXT
            10.field = bodytext
           }
           # add a wrap to test result
           wrap = ZXX|XXZ
          }
         }
        }
       }
      }
     }
    }
   }
  }
}


Geht das überhaupt, nachdem stdheader einen Register erzeugt? Die
Ausgabe der einzelnen pids oder uids geht ohne Probleme.

Danke euch für eure Adleraugen!

Viele Grüße
Robert

_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an