I am trying to have the script print something based on the category it resides in.
For exaple, I have a field for a gif file in my database called "Pic" and I know that if I want that field to be printed all I have to do is type in the tag <%Pic%> on either my links.html or deatained.html template.
Obviously if I want the actual image to be displayed the code will look like:
<%if Pic%>
<img src="<%Pic%>">
<%endif%>
I know how to do simple stuff stuff like this but what I don't know is how to have something printed based on a specific entry on a field.
The category field for example.
If the category = animation I would like it to print "Click here to watch this animation".
The best I can think of is something like.
<%if Category=Animation%>
<a href="<%URL%>">Click here to watch this animation</a>
<%endif%>
but obvioulsy this wrong so can any help me correct this problem?
My site is http://www.flashfilmmaker.com
Another use of this that I plan is to have awards images displayed based on the amoun of hits the URLs have recieved, lets say for example if a site has a hits count between 100 and 1000 silver award will be displayed, if hits = 1000-5000 a gold award will be displayed... and so on.
But I know that in order to get to this point I have to learn to print the results based on the actual entry in the database.
For exaple, I have a field for a gif file in my database called "Pic" and I know that if I want that field to be printed all I have to do is type in the tag <%Pic%> on either my links.html or deatained.html template.
Obviously if I want the actual image to be displayed the code will look like:
<%if Pic%>
<img src="<%Pic%>">
<%endif%>
I know how to do simple stuff stuff like this but what I don't know is how to have something printed based on a specific entry on a field.
The category field for example.
If the category = animation I would like it to print "Click here to watch this animation".
The best I can think of is something like.
<%if Category=Animation%>
<a href="<%URL%>">Click here to watch this animation</a>
<%endif%>
but obvioulsy this wrong so can any help me correct this problem?
My site is http://www.flashfilmmaker.com
Another use of this that I plan is to have awards images displayed based on the amoun of hits the URLs have recieved, lets say for example if a site has a hits count between 100 and 1000 silver award will be displayed, if hits = 1000-5000 a gold award will be displayed... and so on.
But I know that in order to get to this point I have to learn to print the results based on the actual entry in the database.