TYPO3: tt_news LIST and SINGLE at the same page

The following TS code enables the feature of showing the tt_news list and the tt_news single view at the same page.

  1. # Clear the code field
  2. plugin.tt_news.code >
  3. plugin.tt_news.code = LIST
  4. # Prevent indexing of the LIST view
  5. config.index_enable = 0
  6.  
  7. [globalVar = GP:tx_ttnews|swords = ]
  8. # Do nothing (reverse hack)
  9. [else]
  10. # Set code to SEARCH if swords (search is done) exists
  11. plugin.tt_news.code = SEARCH
  12. [end]
  13.  
  14. [globalVar = GP:tx_ttnews|tt_news > 0]
  15. # Set code to SINGLE, if the GETvar tx_ttnews[tt_news] exists
  16. plugin.tt_news.code = SINGLE
  17. # Enable indexing of the SINGLE view
  18. config.index_enable = 1
  19. [global]

This entry was posted in TYPO3/TypoScript. Bookmark the permalink.

2 Responses to TYPO3: tt_news LIST and SINGLE at the same page

  1. Petri Asikainen says:

    Thanks, great tip.

  2. Thorsten Klein says:

    Thanks a lot, saved me a lot of work! :)

Leave a Reply