Page 1 of 1

Company Directory - How to display category image?

Posted: Tue Mar 05, 2013 5:46 pm
by WeeJimmyHat
My website has 10 categories (Biotechnology, Construction, Financial etc). A category landing page contains a Category List template which shows a clickable list of these categories.

When clicking on Construction, for example, a a Summary template shows a list of all companies tagged as belonging to the Construction category.

My client wants a different banner ad to be displayed on each category listings page. So on the Construction listings page, a Construction related banner ad would be displayed.

Each Company Directory category can have an image assigned. My plan was to use this as the banner ad.

I've (just about) figured out how to get the category images to display in the Category List template (on the main directory landing page):

Code: Select all

<img src="/uploads/images/ads/{$obj->image}" />
But I'm not sure how to display the correct category image in the Summary template on the category listings page.

I guess I'd need something like:

If current category = x then display category x image
If current category = y then display category y image

Any ideas?

I'm running CMS MS 1.11.4 and Company Directory 1.17.5.

Any help gratefully received.