Last active
August 29, 2015 14:03
-
-
Save PeterTheOne/d7108ee38cfb5ff6b232 to your computer and use it in GitHub Desktop.
TYPO3 News filter by date range with timeRestriction and timeRestrictionHigh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp.news = USER | |
temp.news { | |
userFunc = tx_extbase_core_bootstrap->run | |
extensionName = News | |
pluginName = Pi1 | |
switchableControllerActions.News.1 = list | |
settings < plugin.tx_news.settings | |
view { | |
templateRootPath = fileadmin/templates/News/Templates/ | |
partialRootPath = fileadmin/templates/News/Partials/ | |
layoutRootPath = fileadmin/templates/News/Layouts/ | |
} | |
settings { | |
startingpoint = 28 | |
detailPid = 41 | |
limit = 1 | |
overrideFlexformSettingsIfEmpty := addToList(detailPid) | |
cropMaxCharacters = 150 | ... | 1 | |
excludeAlreadyDisplayedNews = 1 | |
} | |
} | |
30 = COA | |
30 { | |
wrap = <h4>2014</h4>| | |
1 < temp.news | |
1.view.partialRootPath = fileadmin/templates/News/Partials_pressArchive/ | |
1.settings { | |
startingpoint = 51 | |
detailPid = 85 | |
limit = 30 | |
timeRestriction = 01.01.2014 | |
timeRestrictionHigh = 31.12.2014 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sloved:
Get params tx_news_pi1[overwriteDemand][timeRestriction] and tx_news_pi1[overwriteDemand][timeRestrictionHigh]
For page url's like "http://example.com/news_by_date_range/01.01.2014/31.12.2014/"
In RealURL conf:
'fixedPostVars' => array(
//...
'newsDateFilter' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][timeRestriction]',
),
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][timeRestrictionHigh]',
),
),
'35' => 'newsDateFilter', //replace 35 to news-list page uid
//...
),