[TYPO3-ttnews] human readable dates example in manual
Mark Roemermann
mark at nasaustralia.com.au
Wed Feb 11 10:19:27 CET 2015
A bit more progress.
If I comment out the nomatch directives in the date sample the URL is
generated correctly. So at least that gets me closer to using this live :)
'newsDetailConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[year]',
// 'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_news_pi1[month]',
// 'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_news_pi1[day]',
// 'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
),
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'autoUpdate' => 1,
'expireDays' => 180,
)
)
),
gives me:
http://domain.example/news-events/article/2014/10/28/title-of-article/
However I can mess with the URL manually and get the same page back eg:
http://domain.example/news-events/article/2022/blah/123/title-of-article/
gives me the same news article again.
Is this what the nomatch directives are meant to protect against?
Reading the realurl manual seems to imply these need to be used with
valuemap entries? But those aren't needed due to the varibles just
being used as is right (no 'mapping' needed)?
Soooo....if I enable the nomatch directives, the date vars are stripped.
Any ideas where I'm going wrong?
Cheers.
MarkR.
On 11/02/2015 6:01 PM, Mark Roemermann wrote:
> OK. As per the manual I've enabled
>
> plugin.tx_news.settings.link {
> hrDate = 1
> hrDate {
> day = j
> month = n
> year = Y
> }
> }
>
> and my news list links to the single view with:
>
> http://domain.example/news-events/article/title-of-article/?tx_news_pi1%5Bday%5D=28&tx_news_pi1%5Bmonth%5D=10&tx_news_pi1%5Byear%5D=2014&cHash=0ccecab457366e658583d49256a58584
>
> When I then put the following into the advanced config:
>
> 'fixedPostVars' => array(
> 'newsDetailConfiguration' => array(
> array(
> 'GETvar' => 'tx_news_pi1[day]',
> 'noMatch' => 'bypass',
> ),
> array(
> 'GETvar' => 'tx_news_pi1[month]',
> 'noMatch' => 'bypass',
> ),
> array(
> 'GETvar' => 'tx_news_pi1[year]',
> 'noMatch' => 'bypass',
> ),
> /*array(
> 'GETvar' => 'tx_news_pi1[action]',
> 'valueMap' => array(
> 'detail' => '',
>
> Then my links change to:
>
> http://domain.example/news-events/article/title-of-article/
>
> So the dates aren't coming through, although the parameters seem to be
> detected and removed from the URL.
>
> What am I doing wrong?
More information about the TYPO3-project-tt-news
mailing list