Forum
Archive.php heading based on Category
I want to have a different photo on the top of my archive.php page based on the category i am in.
I originally did this with 2 different blog listing pages (planning.php and news.php) which worked well until I realised the post.php file (via the post_category_link.html template) takes users back to the archive.php?cat=<perch:category id="catSlug" />">
Then I though I would use archive.php?cat=news etc but i think this means i need to put some php code in archive.php along the lines of category=news image1 elseif category=planning image2 else image3
Are either of these the rignt "perch" way to do it or is there a better way. If they are ok, can anyone help me with the code i should add (either to post_category_link.html or to archive.php)
So something like the below would do it if the images are just hardcoded into the page.
Thanks so much - I've managed to switch templates now too