[Typo3] RE: How to use news category effectively?

christian oettinger christian.oettinger at gmx.de
Fri Apr 1 15:51:27 CEST 2005


Hi Olivier!


Please start a new thread next time, for this is a new question that has 
nothing to do with this thread.
Anyway:
I don't know if you are familiar with php and writing your own 
extensions. If yes, it is not too difficult. In typo3/ext/tt_products 
you find all the code of tt_products. in the folder "pi" you have the 
code of the plugin that creates your output.

in the funtion main you find a switch construct that reads out the CODE 
field:

switch($theCode)	{
    case "TRACKING":
    case ...

Depending on the CODE that is inserted in BE in the conde field, 
different funtions are called, so different things are shown in FE.
You now just insert a possibility for the code, let's say "LATEST" you 
get something like:

	case "TRACKING":
		$content.=$this->products_tracking($theCode);
	break;
	case "BASKET":
	case "PAYMENT":
	case "FINALIZE":
	case "INFO":
		$content.=$this->products_basket($theCode);
	case "LATEST":
		$content.=$this->products_latest($theCode);
...

then you insert a function "products_latest" somewhere below in the 
code. (Just take a look at the othe fundtions like products_basket and 
you'll find the way). If you then insert the plugin in BE and add LATEST 
to the CODE field, you get the output of this function.


hope this helps!

greetings from munich

oe


> Hello,
> 
> I've got two categories, let's say:
> 
> Politics
> Sports
> 
> I want to publish the latest from politics and the latest from sports on the
> same page.
> 
> How to do it?
> 
> I tried to find a way to select categories in the setup, but no luck so far.
> 
> Olivier
> 



More information about the TYPO3-english mailing list