I want to have different teasers for different categories.
For example let's say I have 2 categories - type and colour. A subject (article) has always keywords from both these categories. What I want is to display it's teaser differently depending whether it is shown in type category listing or colour category listing. I do not mean here different colour or something like that but I want to hide some parts of teasers completely and to display the shown parts in different order.
I am using category and cck modules so both type and colour categories are also nodes and different content types. All content types have their own templates - i.e. node-content_colour.tpl.php, node-content_type.tpl.php and node-content_article.tpl.php.
First I tried to use a global variable which is set in the colour and and type templates ($_SESSION['xxx']="yyy") and checked in the article template teaser section (if ($_SESSION['tyyp'] == "yyy") etc). Then I tried to set the variable in the page template (using $node->type as variable content) but both solutions have the same problem. It seems that node teasers are loaded before the variable is changed in the category template. So the teasers are always loaded using the variable value set by the previous category.
Is there a solution to overcome this problem or any other way to achieve my goal?
I can of course hide unwanted parts of teaser with css but I cannot and do not wish to use that solution this time.