1
votes

I'm working in TYPO3 v. 6.1 FLUID/EXTBASE. I'm a soccer coach and are making a soccer blog. http://codem.dk/blog/ I have made a Category link list, but when i click on a link it's refresh the page and show all news and not just the news that's related to the category

My category links are.

  • Motion (0 news)
  • Skader & Restitution (2 news)
  • Ernæring (1 news)
  • Opskrifter (2 news)
  • Generelt (2 news)

So if I click the category link "Generelt" then I expect to see 2 news, but it's show all (7 news). When i hover the link i get http://codem.dk/blog/newsCategoryConfiguration/generelt/ and as u can see it's work, but its showing all news, not just the 2 news within the category.

Can someone guide me to a solution for this issue ?

My ext_localconf.php in /public_html/typo3conf/ext/news code, looks like this.

<?php

if (!defined ('TYPO3_MODE')) {
    die ('Access denied.');
}

    // Extension manager configuration
require_once(t3lib_extMgm::extPath('news') . 'Classes/Utility/EmConfiguration.php');
$configuration = Tx_News_Utility_EmConfiguration::getSettings();

Tx_Extbase_Utility_Extension::configurePlugin(
    $_EXTKEY,
    'Pi1',
    array(
        'News' => 'list,detail,dateMenu,searchForm,searchResult',
        'Category' => 'list',
        'Tag' => 'list',
    ),
    array(
        'News' => 'searchForm,searchResult',
    )
);

    // Page module hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$_EXTKEY . '_pi1'][$_EXTKEY] =
    'EXT:' . $_EXTKEY . '/Classes/Hooks/CmsLayout.php:Tx_News_Hooks_CmsLayout->getExtensionSummary';

    // Preview of news records
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][$_EXTKEY] =
    'EXT:' . $_EXTKEY . '/Classes/Hooks/Tcemain.php:Tx_News_Hooks_Tcemain';

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][$_EXTKEY] =
    'EXT:' . $_EXTKEY . '/Classes/Cache/ClassCacheBuilder.php:Tx_News_Cache_ClassCacheBuilder->build';

    // Tceforms: Rendering of fields
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getSingleFieldClass'][$_EXTKEY] =
    'EXT:' . $_EXTKEY . '/Classes/Hooks/Tceforms.php:Tx_News_Hooks_Tceforms';

    // Modify flexform values
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'][$_EXTKEY] =
    'EXT:' . $_EXTKEY . '/Classes/Hooks/T3libBefunc.php:Tx_News_Hooks_T3libBefunc';

/* ===========================================================================
    Custom cache, done with the caching framework
=========================================================================== */
$cachingTableName = 'news_categorycache';
if (!is_array($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName])) {
    $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName] = array();
}
// Define string frontend as default frontend, this must be set with TYPO3 4.5 and below
// and overrides the default variable frontend of 4.6
if (!isset($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['frontend'])) {
    $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['frontend'] = 't3lib_cache_frontend_StringFrontend';
}

if (Tx_News_Utility_Compatibility::convertVersionNumberToInteger(TYPO3_version) < '4006000') {
    // Define database backend as backend for 4.5 and below (default in 4.6)
    if (!isset($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['backend'])) {
        $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['backend'] = 't3lib_cache_backend_DbBackend';
    }
    // Define data and tags table for 4.5 and below (obsolete in 4.6)
    if (!isset($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['options'])) {
        $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['options'] = array();
    }
    if (!isset($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['options']['cacheTable'])) {
        $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['options']['cacheTable'] = 'cf_news_categorycache';
    }
    if (!isset($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['options']['tagsTable'])) {
        $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'][$cachingTableName]['options']['tagsTable'] = 'cf_news_categorycache';
    }
}

    // Class cache
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['class_cache'])) {
    $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['class_cache'] = array(
        'backend' => 't3lib_cache_backend_FileBackend',
        'frontend' => 't3lib_cache_frontend_PhpFrontend',
    );
}

/* ===========================================================================
    Add soft reference parser
=========================================================================== */
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser']['news_externalurl'] = 'EXT:' . $_EXTKEY . '/Classes/Database/SoftReferenceIndex.php:&Tx_News_Database_SoftReferenceIndex';

/* ===========================================================================
    Add TSconfig
=========================================================================== */
    // For linkvalidator
if (t3lib_extMgm::isLoaded('linkvalidator')) {
    t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TSconfig/Page/mod.linkvalidator.txt">');
}

/* ===========================================================================
    Real URL setup
=========================================================================== */
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['action'] = array(
    array(
       'GETvar' => 'tx_news_pi1[controller]',
    ),
    array(
       'GETvar' => 'tx_news_pi1[action]',
    ),
);

/* Normale Newslink setup */
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['news'] = array(
    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' => '-',
             ),
             'enable404forInvalidAlias' => '1',
        ),
    )
);

/* Category setup */
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['newsCategoryConfiguration'] = array(
    array(
        'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
        'lookUpTable' => array(
            'table' => 'tx_news_domain_model_category',
            'id_field' => 'uid',
            'alias_field' => 'title',
            'addWhereClause' => ' AND NOT deleted',
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => array(
                'strtolower' => 1,
                'spaceCharacter' => '-',
             ),
             'enable404forInvalidAlias' => '1',
        ),
    )
);

/* TAGS setup */
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['newsTagConfiguration'] = array(
    array(
        'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
        'lookUpTable' => array(
            'table' => 'tx_news_domain_model_tag',
            'id_field' => 'uid',
            'alias_field' => 'title',
            'addWhereClause' => ' AND NOT deleted',
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => array(
                'strtolower' => 1,
                'spaceCharacter' => '-',
             ),
             'enable404forInvalidAlias' => '1',
        ),
    )
);  
?>
1

1 Answers

0
votes

My guess is that you simply haven't set the "Category mode" of tt_news. Either set it in the plugin to "Show news which have at least one of the selected categories assigned (OR)" (without actually selecting any category) or in the TypoScript:

plugin.tt_news.categoryMode = 1