[TYPO3-english] realurl and tt_news amenu

StephenBungert stephenbungert at yahoo.de
Wed Mar 11 21:25:49 CET 2009


I have real url installed now and i'm pretty hppz with the urls it makes. It
to a while to get them how I wanted, but they are ok. One thing that doesn't
work is the amenu links.

You can see the links real url generates here:
http://www.bungert.co.uk/en/blog.html

They display: http://www.bungert.co.uk/en/archives/category/typo3.html

I'm sure it's because of the 'archive' prevarsets. I added 'noMatch' =>
'bypass' to zear and month because i didn't want the month and year in the
URL to articles, thy are long enough:

e.g: http://www.bungert.co.uk/en/articles/article/title.html

The categories are fine, so are the links, how can I change my realurl setup
so that it display's the correct archive link for archives but then doesn't
add the year and month to categories and article links?


Here is my code for real url:

<?php
	$tx_realurl_config = array(
	    'init' => array(
	        'enableCHashCache' => true,
	        'appendMissingSlash' => 'ifNotFile',
	        'enableUrlDecodeCache' => true,
	        'enableUrlDecodeCache' => true,
	        'emptyUrlReturnValue' => '/',
	    ),
	    
	    'preVars' => array(
		    array(
				'GETvar' => 'no_cache',
				'valueMap' => array(
				'nc' => 1,
				),
				'noMatch' => 'bypass',
			),
		    array(
			    'GETvar' => 'L',
			    'valueMap' => array(
			        'en' => 0,
			        'de' => 1,
			    ),
			    #'noMatch' => 'bypass',
			    'valueDefault' => 'en', 
			),
	    ),
	    
	    'postVarSets' => array(
	        '_DEFAULT' => array(
				'archive' => array(
					array(
						'GETvar' => 'tx_ttnews[month]',
						'noMatch' => 'bypass',      
					),
					array(
						'GETvar' => 'tx_ttnews[year]',
						'noMatch' => 'bypass',
					)
					, array(
						'GETvar' => 'tx_ttnews[day]',
						'noMatch' => 'bypass',
					),
					array(
						'GETvar' => 'tx_ttnews[pS]',
						'noMatch' => 'bypass',
					)
					, array(
						'GETvar' => 'tx_ttnews[pL]',
						'noMatch' => 'bypass',
					),
				),
				'category' => array (
					array(
						'GETvar' => 'tx_ttnews[cat]'
						, 'lookUpTable' => array(
							'table' => 'tt_news_cat'
							, 'id_field' => 'uid'
							, 'alias_field' => 'title'
							, 'addWhereClause' => ' AND deleted != 1'
							, 'useUniqueCache' => 1
							, 'useUniqueCache_conf' => array(
								'strtolower' => 1
							),
						)
					),
				),
				'article' => array(
					array(
						'GETvar' => 'tx_ttnews[tt_news]'
						, 'lookUpTable' => array(
							'table' => 'tt_news'
							, 'id_field' => 'uid'
							, 'alias_field' => 'title'
							, 'addWhereClause' => ' AND deleted != 1'
							, 'useUniqueCache' => 1
							, 'useUniqueCache_conf' => array(
								'strtolower' => 1
								, 'spaceCharacter' => '-'
							)
						)
					)
					, array(
						'GETvar' => 'tx_ttnews[swords]'
					)
				),
				'p' => array(
					array(
						'GETvar' => 'tx_ttnews[pointer]'
					)
				)
				, 'abp' => array(
					array(
						'GETvar' => 'tx_ttnews[backPid]'
					)
				),
				
		        'item' => array (
					array (
						'GETvar' => 'portItem',
						'lookUpTable' => array (
							'table' => 'tx_sbportfolio_items',
							'id_field' => 'uid',
							'alias_field' => 'title',
							'addWhereClause' => ' AND NOT deleted AND NOT hidden',
							'useUniqueCache' => 1,
							'useUniqueCache_conf' => array (
								'strtolower' => 1,
								'spaceCharacter' => '_',
							)
						)
					)
				),
	        ),
	    ),
	    
	    'pagePath' => array(
	        'type' => 'user',
	        'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
	        'spaceCharacter' => '_',
	        'languageGetVar' => 'L',
	        'expireDays' => 3,
	    ),
	    
		'fileName' => array (
			'index' => array(
				'index.html' => array(
					'keyValues' => array(
						'type' => 0,
					)
				), 'rss.xml' => array(
					'keyValues' => array(
						'type' => 100,
					)
				),
				
				'_DEFAULT' => array(
					'keyValues' => array()
				)
			)
			, 'defaultToHTMLsuffixOnPrev' => 1
			, 'acceptHTMLsuffix' => 1
		)
	);
	
	$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
	    'www.bungert.co.uk' => $tx_realurl_config,
	    'bungert.co.uk' => 'www.bungert.co.uk',
	);
	

$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.bungert.co.uk']['pagePath']['rootpage_id']
= 1;
	unset($tx_realurl_config);
?>

-----
-- 
Stephen Bungert
-- 
View this message in context: http://www.nabble.com/realurl-and-tt_news-amenu-tp22463735p22463735.html
Sent from the TYPO3 English mailing list archive at Nabble.com.



More information about the TYPO3-english mailing list