I’m working on a site that sells fish. They have individual pages for each type of fish they sell. They also have about 15 or so fish recipes. The fish are in one channel. The recipes are in another channel. I assigned the same ‘fish’ category group to both channels, and each fish/recipe has a fish category assigned to it. For example, the ‘blackcod’ page has the ‘blackcod’ category assigned to it and all of the recipes that have to do with ‘blackcod’ have the ‘blackcod’ category id assigned to them too.
What I want to do is display teasers for three recipes in the sidebar on the fish page. I want all three to be randomly selected from recipes that have the same category id as the fish page, but if there aren’t three then I want enough recipes with other category ids to be randomly selected until there are a total of three. I then want to output the recipes that match the category id first followed by the other recipes. I hope that makes sense. Here’s a link to a fish page:
http://posustainableseafood.com/index.php/lingcod
Right now the recipes in the sidebar are just randomly selected. Can anyone give me some advice on how to proceed? I enabled PHP on output and I’m playing with that, but it seems a little complicated.
Thanks,
Troy