[TYPO3-ttnews] Re: Hide current displayed news in sidebar list (tx_news)

Daniel Huf huf.daniel at gmail.com
Tue Feb 5 12:26:06 CET 2013


Hi Laurent,

Thanks a lot, yes sorry I didn't specify, it's the 2v

Too late, but just found that http://forge.typo3.org/projects/extension-news/wiki/Exclude_detail_news_from_list_on_the_same_page,

but it seems it's the old way to do it...



So I added to my detail template at the end of the file :

<n:excludeDisplayedNews newsItem="{newsItem}" />


What I have in the setup is that, just added the :
(plugin.tx_news.settings.excludeAlreadyDisplayedNews = 1)

#NEWS
plugin.tx_news {
    settings {
        facebookLocale = {$site.locale_all}
        googlePlusLocale = {$site.language}
        limit = {$site.news.list.limit}
        defaultDetailPid = {$PID.news.singlePid}
        detailPid = {$PID.news.singlePid}
        overrideFlexformSettingsIfEmpty := addToList(detailPid)
        startingpoint = {$PID.news.pid_list}
        displayDummyIfNoMedia = 0
        detail.media.image.lightbox = 0
        excludeAlreadyDisplayedNews = 1
    }
    persistence {
        storagePid = {$PID.news.pid_list}
    }
    view {
        defaultPid = {$PID.news.singlePid}
    }
    mvc {
        callDefaultActionIfActionCantBeResolved = 1
    }
}

lib.news = USER
lib.news {
        userFunc = tx_extbase_core_bootstrap->run
        pluginName = Pi1
        extensionName = News
        controller = News
        settings =< plugin.tx_news.settings
        persistence =< plugin.tx_news.persistence
        view =< plugin.tx_news.view
}

# NEWS DETAIL
lib.page.news.detail < lib.news
lib.page.news.detail {
        action = detail
    switchableControllerActions.News.1 = detail
}

# NEWS LIST
lib.page.news.list < lib.page.news.detail
lib.page.news.list {
        action = list
    switchableControllerActions.News.1 = list
}

[globalVar = GP:tx_news_pi1|news > 0]
    lib.page.news.content = COA
    lib.page.news.content {
        5 = TEXT
        5 {
            data = LLL:{$FILE.locallang}:pageElement.news.backToList
            typolink.parameter = {$PID.news.backPid}
            typolink.ATagParams = class="btn btn-mini"
            wrap = <div class="news-back">|</div>
        }
        10 < lib.page.news.detail
        15 < .5
    }
[else]
    lib.page.news.content < lib.page.news.list
[end]

But I must be missing something... There is no difference...

Cheers, have a nice day.
Daniel 


More information about the TYPO3-project-tt-news mailing list