[TYPO3-ttnews] Items with selected (sub)categories are not visible in FE
Ben van Kruistum
ben at wulf.nl
Thu Dec 18 13:40:52 CET 2008
Hello again
It seems that I have found my solution. Digging a bit futher in the code I
found a setting that could be configured by Typoscript but is not documented
in the manual. (I didn't find it)
pluin.ttnews {
ignoreUseSubcategoriesForAndSelection = 1
}
setting this to one 1 triggers the code to create an sql that takes care of
selecting news items based on the categories and its subcategories.
In combination with the adjustment in my first post, this works likes a
charm.
If I place the tt_news plugin and select the categories "News" and "Fiat"
then it will select the items that corresponds to the categories and
subcategories.
The news item with the selected subcategories "Fiat" and "Scoop" will now be
visible in the FE with the above category selection.
"Ben van Kruistum" <ben at wulf.nl> schreef in bericht
news:mailman.1.1229360388.25783.typo3-project-tt-news at lists.netfielders.de...
> Hello List,
>
> At the moment I am facing some difficulties showing news items based on
> specific categories. If I want to show a list on a page I instert the
> news plugin as a content element. In there I select (besides offcourse the
> needed options) the categories en choose for the category mode "Show items
> with selected categories (AND)" and set the "Use subcategories" to "Yes"
>
> If I preview the FE it is not showing my news items.
>
> I use the following case as an example:
>
> The categories:
> Cars
> Fiat
> Subaru
> Mercedes
>
> News
> Scoop
> Sport
> Government
>
>
> I configure the plugin to show a list with the following categories
> selected : "News" and "Subaru"
> Besides that I have got a news item that has the following categories
> selected, "Subaru","News","Scoop"
>
> The item is not showing. Is this just as expected? I thought it should be
> visible cause the news item corresponds the the selected categories taking
> in account the option "Use subcategories"
>
> The plugin "says" get all news items that are in the category News And
> Subaru. My added news item should be matched cause it is in News and in
> Subaru.
>
> After digging into the code I found the following, what solved my problem
> but I do not know exactly if by changing this something else is falling
> down.
>
> around line 1331(pi/class.tx_ttnews.php) in the function getSelectConf
> there is the piece of code that takes care of the categoryMode "show items
> AND" (the one I selected in the plugin).
> the Variable $tmpCatExclusive is assigned with $this->catExclusive. This
> value contains all selected categories and its subcategories. And it
> evaluates if the found news item has the same amount and corresponding
> categories. In my case the code acts like, does this news item has News,
> Scoop, Sport, Government and Subaru selected.
>
> This is the reason why the news item is not shown while , in my
> perspective , it should have.
>
> There is (after where $tmpCatExclusive is set) a piece of commented code
> that solves my problem. If I asssign $this->actuallySelectedCategories
> instead of then it works like a charm. But I do not know if this is
> causing something else to brake down.
>
>
> With kind regards,
>
> Ben.
>
>
More information about the TYPO3-project-tt-news
mailing list