Thank you on the show if.
Regarding the task of showing a specific include file based on content
1) The include files are the navigation for our 'communities' and it is working great on the details page because on the details page we have one item so there just one community being referred to. The code I copied is the working code.
2) The issue is that on the results pages we are showing multiple records from numerous communities and I do not wish to display the include file based on the 1st record, I want to be able to control which include file (community navigation menu) is displayed based on content.
As I am typing this a possible solution occurred to me. I will try it and update you.