One list page outputting different views depending on category?

12 posts by 2 authors in: Forums > CMS Builder
Last Post: June 18, 2008   (RSS)

By Dave - June 17, 2008 - edited: June 17, 2008

Hi Janet,

I think I understand how it's working now. If you're always going to be setting ?faculty_directory=something on the end of the url you can test $_GET['faculty_directory'] for that value.

Here's some code that does that. This first line just assigns it to $type to make the code simpler and adds @ before $_GET to hide any errors if that's not defined (if you didn't have ?faculty_directory on the url then $_GET['faculty_directory'] wouldn't be defined).

<?php
$type = @$_GET['faculty_directory'];
if ($type == 'Regular Faculty' or
$type == 'Retired Faculty' or
$type == 'Administrative Staff' or
$type == 'Research Staff' or
$type == 'Postdoctoral Associates' or
$type == 'Graduate Students'):
?>
... show code here ...
<?php endif ?>


If that still doesn't do it just email me directly at dave@interactivetools.com and I'll get in there and help you sort it out.

Hope that helps! :)
Dave Edis - Senior Developer
interactivetools.com