Gossamer Forum
Home : Products : DBMan : Customization :

show text according to category

Quote Reply
show text according to category
Hi,

I am trying to show some text according the value for a category field. The code I am using in html_record is



if ($rec{'Region'} eq "Africa" ) { print qq|
<$font><a href="../databank/africamap.htm">Country Profile and debt statistics</a></font>
|;}


if ($rec{'Region'} eq "Asia" ) { print qq|
<$font><a href="../databank/asiamap.htm">Country Profile and debt statistics</a></font>
|;}


if ($rec{'Region'} eq "Latin America" ) { print qq|
<$font><a href="../databank/lamericamap.htm">Country Profile and debt statistics</a></font>
|;}


This works fine for general searches but if I just search on a single region eg. Africa the text doesn't show up all. The same with any of the regions.

Any ideas.
Quote Reply
Re: [smart] show text according to category In reply to
I'm not sure exactly what you mean, but you could try exactly what you have except instead of $rec use $in

in ($in{'Region'} ...