[TYPO3-german] tt_news - related in single view - GELÖST

Niels Tiedt nt at typo3-coder.org
Thu Sep 25 17:40:00 CEST 2008


Es tut endlich alles
Das ist das fertige Script um bei den related news title und bild/image 
anzuzeigen.

temp_relNews >
temp_relNews = CONTENT
temp_relNews {
  # nur wenns eine ID gibt
  if.isTrue.data = GPvar:tx_ttnews|tt_news
 
    table = tt_news
  select {
        pidInList = 1087
        andWhere = tt_news.uid=tt_news_related_mm.uid_foreign
        andWhere{
      data = GPvar:tx_ttnews|tt_news
          wrap = tt_news_related_mm.uid_local = |
        }
       
        leftjoin = tt_news_related_mm ON 
tt_news.uid=tt_news_related_mm.uid_foreign and tablenames='tt_news'
        max = 1
  }
  # Darstellung des Titels
  renderObj = COA
  renderObj {
    wrap = <div id="news_related">|</div>
    10 = TEXT
    10{
      required=1
      field = title
      #wrap = |
    }
    20 = IMAGE
    20{
      required=1
      wrap = |
      file.import = uploads/pics/
      file.import.field = image
      file.width = 100
      file.height = 100
    }
  }
}


 # Build the list of related news:
plugin.tt_news{
  # icon for related news
  tmp.5 = IMAGE
  tmp.5 {
    file = EXT:tt_news/ext_icon.gif
    file.width = 11
    file.height = 12
    wrap = | &nbsp;
  }
  tmp.5 >

  # end-wrap for the getRelated objects
  tmp.20 = TEXT
  tmp.20 {
    field = datetime
    strftime = %d-%m-%y %H:%M
    wrap = &nbsp;-&nbsp; |
  }
  tmp.20 >

  # Build the list of related news:
  getRelatedCObject = COA
  getRelatedCObject {
    # groupBy =
    orderBy = datetime desc
 
    10=CASE
    10.key.field=type
    # settings for 'normal' related news
    10.default < temp_relNews
  }
}
Vielen Dank nochmal an David.

Grüße
Niels Tiedt
> Hi
> Endlich nach ewigem hin und her hats geklappt.
> Allerdings bekomme ich es nicht mit plugin.tt_news.related_stdWrap.wrap 
> verknüpft.
>
> temp_relNews = CONTENT
> temp_relNews {
>   # nur wenns eine ID gibt
>   if.isTrue.data = GPvar:tx_ttnews|tt_news
>  
>     table = tt_news
>   select {
>         pidInList = 1087
>         andWhere = tt_news.uid=tt_news_related_mm.uid_foreign
>         andWhere{
>       data = GPvar:tx_ttnews|tt_news
>           wrap = tt_news_related_mm.uid_local = |
>         }
>        
>         leftjoin = tt_news_related_mm ON 
> tt_news.uid=tt_news_related_mm.uid_foreign and tablenames='tt_news'
>         max = 1
>   }
>   # Darstellung des Titels
>   renderObj = COA
>   renderObj {
>     wrap = <div id="news_related">|</div>
>     10 = TEXT
>     10{
>       required=1
>       field = title
>       #wrap = |
>     }
>     20 = IMAGE
>     20{
>       required=1
>       wrap = |
>       file.import = uploads/pics/
>       file.import.field = image
>       file.width = 100
>       file.height = 100
>     }
>   }
> }
>
>
> --> das geht
> page.10.10 >
> page.10.10 < temp_relNews
>
> --> das geht nicht.
> plugin.tt_news{
>     related_stdWrap.wrap = {temp_relNews} |
>     related_stdWrap.wrap.insertData = 1
> }
>
> Wie bekomme ich das hin?
>
> Please help!
> Mir fehlt nur noch der kleine Teil...
> Danke und Gruß
> Niels Tiedt



More information about the TYPO3-german mailing list