[TYPO3] my typoscript is faulty ... but where?

Cate & Peter catepeter at optusnet.com.au
Sat Nov 11 07:27:06 CET 2006



Hi Fabian

>We need to see your typoscript-source to find errors. ;)

Well ... yeah. :)  sorry... here 'tis - with a repeat of the problem..

 I am trying to code up in typoscript the same sort of functionality as
found
 in the "top content" plugin (which I can't get to work :S)

 Everything is fine, except I am trying to retrieve some page content and I
 think I must be using the wrong field.

 I was using tt_content's "bodytext" field - but that was only retrieving
one
 word, not a snippet of content.

 I am wondering if it is getting stuffed up becs of using TV and having
 elements in elements.

 The pages that are being retrieved are ok .. and the section headers. Now,
 how can I get the content?

 
 Thanks for any pointers,

lib.lastEdited = COA
lib.lastEdited {
  10 = LOAD_REGISTER
  10{
    lvl1uids.cObject = CONTENT
    lvl1uids.cObject {
      table=pages
      select.pidInList.data = leveluid:0
      renderObj = TEXT
      renderObj.field = uid
      renderObj.wrap = |,
    }
    lvl2uids < .lvl1uids
    lvl2uids.cObject.select.pidInList.data= register:lvl1uids
    lvl3uids < .lvl1uids
    lvl3uids.cObject.select.pidInList.data= register:lvl2uids
    lvl4uids < .lvl1uids
    lvl4uids.cObject.select.pidInList.data= register:lvl3uids
    lvl5uids < .lvl1uids
    lvl5uids.cObject.select.pidInList.data= register:lvl4uids
    alluids.cObject = COA
    alluids.cObject {
      10=TEXT
      10.data = register:lvl1uids
      20=TEXT
      20.data = register:lvl2uids
      30=TEXT
      30.data = register:lvl3uids
      40=TEXT
      40.data = register:lvl4uids
      50=TEXT
      50.data = register:lvl5uids
      60=TEXT
      60.data = leveluid:0			
    }
     
  }
  20 = CONTENT
  20 {
    table = tt_content
    select {
      pidInList.data = register:alluids
      orderBy = tstamp DESC
      languageField=sys_language_uid
      max = 3
       }
    renderObj = COA
    renderObj {
      10 = TEXT
      10.field = header
      10.typolink.parameter.field=pid
      10.typolink.parameter.stdWrap.dataWrap=#uid
      10.wrap = <div class=feature_subheader|</div
      20 = TEXT
      20.field = bodytext
      20 {
           crop=100 | ... | 1
           cObjNum = 1
           1.current = 1
           }
       20.typolink.parameter.field=pid
      20.typolink.parameter.stdWrap.dataWrap=#uid
      20.wrap = <div class=feature_content|</div
      30 = TEXT
      30.field = tstamp
      30.strftime = %d-%b-%Y
      30.wrap =  <div class="feature_content"&nbsp;Edited&nbsp;| </div

    }     
  }
     wrap=<div class="feature_header"Last Edited</div    
}

Its in this last block of code that I'm working ... lines starting with
"20". Just trying to work out if the TV is impacting things in ways I am not
foreseeing, or ... not sure.

Thanks :)
Cate





More information about the TYPO3-english mailing list