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).
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! :)
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
interactivetools.com
Re: [Dave] One list page outputting different views depending on category?
By Janet - June 18, 2008
To the rescue, again. That worked perfectly.
Now if only you had some magic code that would stop my client from making tons of revisions and rewrites.
Jan
Now if only you had some magic code that would stop my client from making tons of revisions and rewrites.
Jan