.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../../Includes.txt Integrations with TypoScript ---------------------------- This page gives you same examples which you can use for integrating EXT:news into a website. .. only:: html .. contents:: :local: :depth: 1 Add news by TypoScript ^^^^^^^^^^^^^^^^^^^^^^ If EXT:news should be integrated by using TypoScript only, you can use this code snippet: .. code-block:: typoscript lib.news = USER lib.news { userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run extensionName = News pluginName = Pi1 vendorName = GeorgRinger switchableControllerActions { News { 1 = list } } settings < plugin.tx_news.settings settings { //categories = 49 limit = 30 detailPid = 31 overrideFlexformSettingsIfEmpty := addToList(detailPid) startingpoint = 13 } } Now you can use the object lib.news. List and detail on the same page using TypoScript ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is the example of how to display list and detail view on the same page. .. code-block:: typoscript # Basic plugin settings lib.news = USER lib.news { userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run pluginName = Pi1 vendorName = GeorgRinger extensionName = News controller = News settings =< plugin.tx_news.settings persistence =< plugin.tx_news.persistence view =< plugin.tx_news.view } Configure list and detail actions: .. code-block:: typoscript lib.news_list < lib.news lib.news_list { action = list switchableControllerActions.News.1 = list } lib.news_detail < lib.news lib.news_detail { action = detail switchableControllerActions.News.1 = detail } Insert configured objects to wherever you want to use them, depending on the GET parameter of detail view: .. code-block:: typoscript [globalVar = GP:tx_news_pi1|news > 0] page.10.marks.content < lib.news_detail [else] page.10.marks.content < lib.news_list [end] Add news to breadcrumb menu ^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you want to show the news title in the breadcrumb menu if the single view is currently selected, use a TypoScript like this: .. code-block:: typoscript lib.navigation_breadcrumb = COA lib.navigation_breadcrumb { stdWrap.wrap =
10 = HMENU 10 { special = rootline #special.range = 1 1 = TMENU 1 { noBlur = 1 NO = 1 NO { wrapItemAndSub =