show category name at top filtered list page

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 2, 2009   (RSS)

By wizzle - March 18, 2009

fantastic product so far. I love it, but it makes me feel like an idiot!! [:)]

I'm quite sure this is simple, but an hour of searching got nothing.

my current page is http://www.akmolecular.com/testmenu2.php

On the left if someone clicks a category like "genetics" I want the header of the table to say the category name (Genetics) instead of just saying "Test". If all records are being displayed it should say "All Tests"

My basic thought was
If category doesn't exist print "All test" else print [category]

I tried simpler first not dealing with the if else part and used <?php echo $testsRecord['category'] ?>
and <?php echo $Record['category'] ?>
but only got error

thanks in advance
Greg Williams

Re: [ross] show category name at top filtered list page

By wizzle - April 2, 2009

Thanks. sorry it took a while to reply back... got busy.

Your code worked. I added to it to come up with

<?php if (@$_GET['category']=="") {echo "Test Menu";} else {echo @$_GET['category'];} ?>

so that when they click on "view all" or one of the letters, it will just say "Test Menu" in that place.

Thanks again.
Greg Williams