Word to image

Author Message

Niklas Gunnäs

Thursday 05 January 2006 6:12:11 am

Hi

I'm have started to create a simple template for listing projects. It looks more or less like Bug reports listed her at ez.no. What I would need help with is to show different image in front of projects listed, depending on two different values for example if priority is set to high and Category is set to community it will show a community image in red.

Regards

Niklas

Felix Laate

Friday 06 January 2006 9:35:23 am

Hi Niklas!

If you have some attributes "priority" and "category" in your "project" class, you could fetch the projects and loop through them

{foreach $all_projects as $project}

{if eq($project.data_map.priority.content,'high')}
<img src="high.gif">
{elseif eq($project.data_map.priority.content,'medium')}
<img src="medium.gif">
{else}
<img src="low.gif">
{/if}

.. the rest of the content of $project ..


{/foreach}

 

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.