Zum Inhalt springen

News-System mit RealurlConf -> Probleme mit der Darstellung der Links

Erstellt am 4. März 2014 · 1 Antwort · letzte Antwort am 18. März 2014

Tags: RealURL, tx_news, TYPO3 6, Frage

reinki0013 ·

Hallo Zusammen,

ich nutze das news_system (2.3.0) und ebenso den Realurl Configurator (1.0.3).
Ich habe das Problem, dass ich auf meiner News-Listen-Übersicht zwar überall zu den einzelnen Beiträgen die Links habe, diese funktionieren auch, allerdings sieht die URL wirklich furchtbar aus, hier ein Beispiel:

http://www.muster_platzhalter/newsarchiv/detail/?tx_news_pi1%5Bnews%5D=6&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=d4ceacc2b20e7d031fd6e3ec41ebee0f

Ich hätte aber gerne eher sowas in diese Richtung:

http://www.muster_platzhalter.at/newsarchiv/detail/dies-ist-ein-musterartikel

Ist das möglich, wenn ja wie gehe ich da am besten vor?
Ich hänge euch hier noch meine aktuelle conf-Datei an:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
        'init' => array(
            'enableCHashCache' => 1,
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
            'respectSimulateStaticURLs' => 0,
            'postVarSet_failureMode'=>'redirect_goodUpperDir',
        ),
    'redirects_regex' => array (
    
    ),
    'preVars' => array(
                        array(
                                'GETvar' => 'no_cache',
                                'valueMap' => array(
                                    'no_cache' => 1,
                                ),
                                'noMatch' => 'bypass',
                        ),
                         array(
                             'GETvar' => 'L',
                             'valueMap' => array(
                                                'en' => '1',
                                        ),
                                'noMatch' => 'bypass',
                        ),
                ),
     'pagePath' => array(
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => 7,
            'rootpage_id' => 1,
        ),


      'postVarSets' => array(

// EXT:news start
'news' => array(
        array(
                'GETvar' => 'tx_news_pi1[action]',
        ),
        array(
                'GETvar' => 'tx_news_pi1[controller]',
        ),
        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,
                ),
        ),
),
// EXT:news end
            '_DEFAULT' => array(
                // news archive parameters
                'archive' => array(
                    array(
                        'GETvar' => 'tx_ttnews[year]' ,
                        ),
                    array(
                        'GETvar' => 'tx_ttnews[month]' ,
                            'valueMap' => array(
                            'january' => '01',
                            'february' => '02',
                            'march' => '03',
                            'april' => '04',
                            'may' => '05',
                            'june' => '06',
                            'july' => '07',
                            'august' => '08',
                            'september' => '09',
                            'october' => '10',
                            'november' => '11',
                            'december' => '12',
                            )
                        ),
                    ),
                // news pagebrowser
                'browse' => array(
                    array(
                        'GETvar' => 'tx_ttnews[pointer]',
                        ),
                    ),
                // news categories
                'select_category' => array (
                    array(
                        'GETvar' => 'tx_ttnews[cat]',
                        ),
                    ),
                // news articles and searchwords
                'article' => array(
                    array(
                        'GETvar' => 'tx_ttnews[tt_news]',
                        'lookUpTable' => array(
                            'table' => 'tt_news',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                'strtolower' => 1,
                                'spaceCharacter' => '-',
                                ),
                            ),
                        ),
                    array(
                        'GETvar' => 'tx_ttnews[swords]',
                        ),
                    ),
                ),             
            ),

      'fileName' => array(
            'defaultToHTMLsuffixOnPrev'=>0,
            'index' => array(
                'rss.xml' => array(
                    'keyValues' => array(
                        'type' => 100,
                    ),
                ),
                'rss091.xml' => array(
                    'keyValues' => array(
                        'type' => 101,
                    ),
                ),
                'rdf.xml' => array(
                    'keyValues' => array(
                        'type' => 102,
                    ),
                ),
                'atom.xml' => array(
                    'keyValues' => array(
                        'type' => 103,
                    ),
                ),
            ),
        ),
 );
ra-kue-lue ·

Hallo,

mit dieser realurl_conf.php:

<?php

$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment';
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
        'pagePath' => array(
                'type' => 'user',
                'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
                'spaceCharacter' => '-',
                'languageGetVar' => 'L',
                'expireDays' => '3',
                'rootpage_id' => 1,
                'firstHitPathCache' => 1
        ),
        'init' => array(
                'enableCHashCache' => TRUE,
                'enableCHashCache' => 1,
                'respectSimulateStaticURLs' => 0,
                'enableUrlDecodeCache' => 1,
                'enableUrlEncodeCache' => 1
        ),
        'preVars' => array(
                array(
                        'GETvar' => 'L',
                        'valueMap' => array(
                                'de' => '0',
                        ),
                        'noMatch' => 'bypass',
                ),
                array(
                        'GETvar' => 'no_cache',
                        'valueMap' => array(
                                'nc' => 1,
                        ),
                        'noMatch' => 'bypass',
                ),
        ),

        'postVarSets' => array(
                '_DEFAULT' => array(
					// EXT:news start
					'artikel' => array(
/*
*
					        array(
					                'GETvar' => 'tx_news_pi1[action]',
					        ),
					        array(
					                'GETvar' => 'tx_news_pi1[controller]',
					        ),

*/
					        
					        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[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,
					                ),
					        ),
					),
					// EXT:news end
                ),
        ),

);

?>

... und diesem Typoskript im SetupTS:

plugin.tx_news {
	settings {
		link {
			skipControllerAndAction = 1
			hrDate = 1
			hrDate {
				day = j
				month = n
				year = Y
				}
			}
		}
	}

... bekomme ich solche Links:

http://www.meinedomain.de/aktuelles/details/artikel/17/3/2014/in-eigener-sache/

Dies ist mehr oder weniger 1 zu 1 von der Doku von "news" übernommen.

'noMatch' => 'bypass',

habe ich bei den Datumsfeldern auskommentiert, weil sonst nix angekommen wäre außer mehrfach Slashes.

Hoffe, es hilft.

Ralf