Use picture to indicate each category

If you made a template for printing or HTML export, you can offer it to the others here. You can also ask here for help about these templates
Post Reply
binoyt
Posts: 8
Joined: 2004-08-30 09:50:43
Location: Liège, Belgium

Use picture to indicate each category

Post by binoyt »

I use the template of Twink (xml) and I would like to use a picture to indicate each category.

I transformed the basic code:
<text value="movie.getAttribute('Category') />

to:
<img src="'pics\\cat'+(movie.getAttribute('Category'))+'.gif'"/>

That shows correctly my pictures (if they are well named catX.gif
in the pics folder (where x is the name of Category)).

But the problem is the movies with many categories (e.g. Action / Thriller)

It will be necessary to write a script where the / (or an other character, that doesn't have importance) would be recognized like a separator.

An other soluce (but more complicated, I think) would be to write a sort of database with a valour to each data.

This idea would be applicated to another datas like countries (like I have already write in a precedent post, but less clearly) and for another templates.

Thanks if you try to resolve my problem and if you took time to read this and sorry for the grammatical faults, english isn't my maternel language.
binoyt
Posts: 8
Joined: 2004-08-30 09:50:43
Location: Liège, Belgium

Post by binoyt »

I search now an other template, more operationnel (readable on internet and by mozilla). I rediscovered the template from Tobo which a good base and some capacities, but I have a problem:

You will believe that I lose too much time to these details but, I would really like use pictures to indicate categories, countries and rating. I have resolved my old problem with the choices of a single country and a single category for each film.

But here I am confronted with another problem: I'm trying to change the data:
nrKat[nummer] = "$$ITEM_CATEGORY"
in:
nrKat[nummer] = "<img src='../img/cat"+$$ITEM_CATEGORY+".gif' />";
But then the catalog doesn’t display any more. What do I have to do?
Post Reply