[Typo3] smile_categorization - Boolean criteria for "selecting" ?

Francesco di Francia darksky77 at email.it
Sun May 22 13:33:20 CEST 2005


Hi.

I found smile_categorization really a powerful tool, but i'm stucked.
My sites topic is wargame and military history. In the front end, for 
each article i'd like to have a list of "related" articles, such as: 
"Article related to the same hystoric era", "article related to the same 
kind of game", and so on...
So Each of my article belong to different categories. For example:

A Game review article
Cat.:
	- Game
	- Medieval Era
	- Turn Based

Military Hystory Article
Cat.:
	- Historical Article
	- Medieval Era
	- Biography

I found that the Plugin "Category contents" of this extension display 
the content by an OR logic. I.e. if, in the backend, i fill the field 
"Categories to display" with "Medieval Era" and "Game" i obtain in 
fronted a list of links pointing to ALL content that belong to at least 
ONE of these category.
There's a Way to make it work by an AND logic ?

In the TS Setup of this extension i found this:

plugin.tx_smilecategorization_pi1 = CASE
	plugin.tx_smilecategorization_pi1 {
	
		key.field = tx_smilecategorization_plugin_display
		
		# We used the display of TYPO 3 for complete contents
		2 = CONTENT
	    	2 < styles.content.get
	    	2.table = tt_content
	    	2.select {
	      		pidInList = *
	      		orderBy = sorting
	      		whereCategoryIn = plugin
	      		orderType = {$plugin.smile_categorization.orderType}
	      		orderAsc = {$plugin.smile_categorization.orderAsc}
	    	}
		
		# We used a PHP function for a tree or abstracted contents.
		default = USER
		default.userFunc = tx_smilecategorization_pi1->main
		default.templateFile = {$plugin.smile_categorization.templateFile}
		default.abstractLength = {$plugin.smile_categorization.abstractLength}
		default.orderType = {$plugin.smile_categorization.orderType}
		default.orderAsc = {$plugin.smile_categorization.orderAsc}
	}

My poor knowledge of SQL tells me that the key line could be :

whereCategoryIn = plugin

but then i don'k know what to do.

Thanks in advance for help




More information about the TYPO3-english mailing list