I have a blog page on one of the websites which is done using TypoScript to avoid having a list and detail page.
I have called the TypoScript as an object: lib.newslist
.
plugin.tx_news.settings.list.paginate.itemsPerPage = 6
lib.news = USER_INT
lib.news {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
pluginName = Pi1
vendorName = GeorgRinger
extensionName = News
controller = News
settings < plugin.tx_news.settings
settings {
categories = 1
#limit = 6
detailPid = 6
overrideFlexformSettingsIfEmpty := addToList(detailPid)
startingpoint = 21
hidePagination = 0
categoryConjunction = or
}
persistence =< plugin.tx_news.persistence
view =< plugin.tx_news.view
}
[(request.getQueryParams()['tx_news_pi1'])['news'] > 0 || (request.getParsedBody()['tx_news_pi1'])['news'] > 0]
lib.newslist = COA
lib.newslist {
10 < lib.news
10 {
action = detail
switchableControllerActions.News.1 = detail
stdWrap.wrap = <section class="blog-section"><div class="container">|</div></section>
}
20 = RECORDS
20 {
source = 307
dontCheckPid = 1
tables = tt_content
}
}
[else]
lib.newslist < lib.news
lib.newslist {
action = list
switchableControllerActions.News.1 = list
stdWrap.wrap = <div class="section-heading mb-5"><h2>Blog</h2></div>|
}
[end]
[else]
lib.newslist = COA
lib.newslist {
action = list
switchableControllerActions.News.1 = list
stdWrap.wrap = <div class="section-heading mb-5"><h2>Blog</h2></div>|
}
[end]
Now I needs to add a category list to this. So I have added the following TypoScript:
lib.categoryMenu = USER
lib.categoryMenu {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = News
pluginName = Pi1
vendorName = GeorgRinger
action = category
switchableControllerActions {
Category {
1 = list
}
}
settings < plugin.tx_news.settings
settings {
listPid = 6
}
}
The problem in this is there is no list page or detail page, so what will I give instead of the listPid = 6
(6 is the page from which I called the TypoScript objects).
And please suggest if there is any other method to implement this category selection without specifying the list page.