[TYPO3-ttnews] tt_news relatedByCategory

RICARDO GARZA MADERA richgarzam at me.com
Thu Oct 18 23:32:41 CEST 2012


Hey guys, I'm new to this so I'll be as short as possible.

I'm trying to include automatically Related News By Category on my single views.
plugin.tt_news.showRelatedNewsByCategory = 1

with absolutely no luck.

Additional TS Setup
 /* Settings for Related News: */
  # automagically display the source article as related in the related article
  useBidirectionalRelations = 1
  # display pages as related news
  usePagesRelations = {$plugin.tt_news.usePagesRelations}
  
  related_stdWrap.wrap =  <div class="newsSingle-related">|</div>
  relatedHeader_stdWrap.wrap = <div class="newsRelated-header">|</div>
  
  getRelatedCObject >
  getRelatedCObject = COA
  getRelatedCObject {
    groupBy =
    orderBy = datetime desc
    10 = CASE
    10.key.field = type
    10.default.20.strftime =
    10.default.20.wrap =
    10.default = COA
    10.default {
      wrap = <div class="newsRelated-item">|</div>
      10 = TEXT
      10.field = title
      10.typolink.parameter = {$plugin.tt_news.singlePid}
      10.typolink.additionalParams.data=register:newsAddParams
      10.typolink.useCacheHash = 1
    }
    11 =  RECORDS
    11 {
      wrap = <div class="newsRelated-cat">|</div>
      source.data = register:newsCategoryUid
      tables = tt_news_cat
      conf.tt_news_cat >
      conf.tt_news_cat = TEXT
      conf.tt_news_cat.field = title
    }
     
    12 = IMAGE
    12 {
      wrap = <div class="newsRelated-image">|</div>
      file.import.field = image
      file.import = uploads/media/
      file.import.listNum = 0
      file.width = 250
    }
  }
  
  userFunc = tx_ttnews->main_news

  # Example for overriding values from locallang.php with other values
  _LOCAL_LANG.de {
    # more = [weiterlesen...]
  }
  
  # Alters behavior of tt_news to be compatible with certain previous versions. See manual for details.
  compatVersion = 3.0.0

  # Related News By Categ
  relNewsByCategory_stdWrap.wrap =  <div class="newsSingle-relatedByCat">|</div>
  relNewsByCategoryHeader_stdWrap.wrap = <div class="newsRelatedByCat-header">|</div>
  relNewsByCategory {
    code = list
    categoryMode = 1
    noPageBrowser = 1
    limit = 5
    noNewsToListMsg_stdWrap.wrap = 
    displayList {
      time_stdWrap.strftime= %H:%M
      date_stdWrap.strftime= %d.%m.%Y
      title_stdWrap.crop = 55|...
    }
    _LOCAL_LANG {
      de.noNewsToListMsg = 
      en.noNewsToListMsg = 
    }
    altMainMarkers.TEMPLATE_LIST = TEMPLATE_CAT_RELATED
    altMainMarkers.TEMPLATE_LIST.wrap = ### | ###
  }


Could anyone point me in the right direction here?? Thanks guys!


More information about the TYPO3-project-tt-news mailing list