Zum Inhalt springen

tt_news und realurl

Erstellt am 16. Dezember 2008 · 4 Antworten · letzte Antwort am 20. Dezember 2008

Tags: RealURL, tt_news, Frage

bys4ever ·

Hallo zusammen.

Ich bin auf der Suche nach tt_news und realurl auf die seite http://www.ringer.it gestoßen.
Und habe die Super Beschreibung auch gleich probiert. Nur leider klappt das bei mir nicht.

Mein Feld TS Setup:

//...
page.10.subparts.CONTENT_MITTE < styles.content.get
page.10.subparts.INHALT_RECHTS < styles.content.getRight
page.10.subparts.INHALT_LINKS < styles.content.getLeft
page.10.subparts.MAINNAVI < tmp.MAINNAVI
page.10.subparts.SUBNAVI_1 < tmp.SUBNAVI_1
page.10.subparts.SUBNAVI_2 < tmp.SUBNAVI_2
page.10.subparts.TOPNAVI < tmp.TOPNAVI
page.10.subparts.FEEDNAVI < tmp.FEEDNAVI
page.10.subparts.BREADMENU < tmp.BREADMENU
page.10.subparts.NEWSBLOCK < tmp.LATEST_NEWS

temp.tt_news= RECORDS
temp.tt_news {  
        if.isTrue.data = GPvar:tx_ttnews|tt_news       
	source.data = GPvar:tx_ttnews|tt_news
	tables = tt_news
}
 
page.10.subparts.CONTENT_MITTE >
page.10.subparts.CONTENT_MITTE = COA
page.10.subparts.CONTENT_MITTE{
	10 = COA
	10 {  
		if.isTrue.cObject < temp.tt_news
		30 < temp.tt_news
	} 
	 
	20 = COA
	20 {
		if.isFalse.cObject < temp.tt_news
		30 < styles.content.get
	}
}

# RealURL aktivieren
config.simulateStaticDocuments = 0
config.baseURL = http://www.meinedomain.de/
config.tx_realurl_enable = 1 
config.prefixLocalAnchors = all


plugin.tt_news.displayList {
date_stdWrap.strftime= %d.%m.%y
}

plugin.tt_news.displaySingle.image.imageLightbox2 = 1 
plugin.tt_news.displaySingle.subheader_stdWrap.wrap = <h2>|</h2>
//...

desweiteren habe ich in der mit dem urltool erzeugten konfiguration den Abschnitt

//....
    'fixedPostVars' => array(
      'news' => array(
        array(
          'GETvar' => 'tx_ttnews[pointer]',
          'valueMap' => array(),
          'noMatch' => 'bypass',
        ),
        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' => '-',
            ),
            'languageGetVar' => 'L',
            'languageExceptionUids' => '',
            'languageField' => 'sys_language_uid',
            'transOrigPointerField' => 'l18n_parent',
            'autoUpdate' => 1,
            'expireDays' => 180,
          ),
        ),
      ),
 
    ),
 
//....

hinzugefügt.

und in der Datei ext_localconf.php habe ich noch das

// RealURL - valueMap creation for tt-news
for($x=1; $x<=100; $x++) {
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['fixedPostVars']['news'][0]['valueMap'][$x+1] = $x;
}
 
 
// RealURL - page definition for tt_news, 82 = Single Page UID
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['fixedPostVars']['82'] = 'news';

eingefügt. Und die UID an meine Single Page angepasst.

Nur leider funktioniert das nicht. Es verändert sich nichts.

Ich hoffe Ihr könnt mir weiterhelfen.

DANKE

danton ·

hi
ich denke deine tt_news definitionen in der localconf fehlen.
oder wenn du die neue realurl verwendest autoconf.
folgendes ist für 2 domain mit 11 sprachen und tt_products etc.
aber daran kannst du sehr gut sehen wie es aussehen sollte.

<?php
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
  '_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(
                                                'de' => '0',
                                                'en' => '1',
                                                'si' => '3',
                                                'it' => '4',
                                                'fr' => '5',
                                                'pl' => '6',
                                                'es' => '7',
                                                'nl' => '8',
                                                'se' => '9',
                                                'cz' => '10',
                                                'ro' => '11',
                                                'valueDefault' => 'de',
                                        ),
                                'noMatch' => 'bypass',
                             'GETvar' => 'print',
                             'valueMap' => array(
                                                'print' => '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(
            '_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]',
                        ),
                    ),
                    // backPID
                    'backPID' => array(
                             array(
                                     'GETvar' => 'tx_ttproducts_pi1[backPID]',
                                     'lookUpTable' => array(
                                             'table' => 'pages',
                                             'id_field' => 'uid',
                                             'alias_field' => 'title',
                                             'addWhereClause' => ' AND NOT deleted',
                                             'useUniqueCache' => 1,
                                             'useUniqueCache_conf' => array(
                                                     'strtolower' => 1,
                                                     'spaceCharacter' => '-',
                                             ),
                                     ),
                             ),
                    ), 
                    // product categories
                    'categories' => array(
                             array(
                                     'GETvar' => 'tx_ttproducts_pi1[cat]',
                                     'lookUpTable' => array(
                                             'table' => 'tt_products_cat',
                                             'id_field' => 'uid',
                                             'alias_field' => 'title',
                                             'addWhereClause' => ' AND NOT deleted',
                                             'useUniqueCache' => 1,
                                             'useUniqueCache_conf' => array(
                                                     'strtolower' => 1,
                                                     'spaceCharacter' => '-',
                                             ),
                                     ),
                             ),
                    ),
                    // products
                    'products' => array(
                             array(
                                     'GETvar' => 'tx_ttproducts_pi1[product]',
                                     'lookUpTable' => array(
                                             'table' => 'tt_products',
                                             'id_field' => 'uid',
                                             'alias_field' => 'title',
                                             'addWhereClause' => ' AND NOT deleted',
                                             'useUniqueCache' => 1,
                                             'useUniqueCache_conf' => array(
                                                     'strtolower' => 1,
                                                     'spaceCharacter' => '-',
                                             ),
                                     ),
                             ),
                    ),
                ),             
            ),

      'fileName' => array(
            'defaultToHTMLsuffixOnPrev'=>1,
            '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,
                    ),
                ),
            ),
        ),
   ),
 );
/**************************/
/* Für domain examplea und exampleb */
/**************************/
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.examplea.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.examplea.de']['pagePath']['rootpage_id'] = 1;

$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.exampleb.info'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.exampleb.info']['pagePath']['rootpage_id'] = 383;

?>

gruß danton

bys4ever ·

Hallo erstmal und danke das du dir die Arbeit gemacht hast.
Nur leider steh ich seit gestern abend auf dem schlauch und habe keine ahnung was ich damit machen soll.

:o

danton ·

hi
sorry ich sehe grad du nutzt nen tool für die realurl-conf?
mit dem kenne ich mich null aus.
normalerweise ist es so. (was ist schon normal :-))
realurl macht ne eigene autoconfiguration und
legt eine datei ...autoconf.php im gleichen verzeichnis wie die localconf.php ab.

damit die autoconf geladen wird trägt realurl die datei in die localconf ein.
d.h. nicht anderes als das realurl seine konfiguration in der ...autoconf.php einträgt.
dort kannst du meinen code reinwerfen und nach deinen belieben anpassen.
z.b. denke ich nicht das du 2 domain-configs brauchst.

wenn nicht tut schmeiß mal die urltool temporär raus.

und nicht vergessen alle caches zu löschen.

gruß danton