Forums / Cotonti / General / cat icon & sprite

Bosco
#1 2011-05-01 15:00

is that possible with Cotonti in a simple manner?

Trustmaster
#2 2011-05-01 15:34

Could you explain what you want in detail please?

May the Source be with you!
Bosco
#3 2011-05-01 15:43

Well, I want to put all the category icons in one image file,  with the page icons I use. But you must add them per category, and  I am not sure how to continue. I got a rather heavy site when it comes to imagery, so I want to put as much images in single files as possible.

GHengeveld
#4 2011-05-03 08:06

Yes it can be done, but you can't use the category icon field in the cms anymore, you have to use template logic to achieve it. It just works like regular sprites.

Bosco
#5 2011-05-03 11:01

I'm not really used to that logic block thingy, can you please give one example Koradhil?

Added 4 hours later:

while we are on the subject of logic blocks;

 

what tags do I use on the marked places?

<!-- IF {here} > here  --><img src="img/filename.jpg"/> <!-- ENDIF -->

 

when I want to display an image in my news.tpl when there is a file attached to that page.


Dit bericht is bewerkt door Bosco (2011-05-03 15:03, 12 jaren ago)
Kort
#6 2011-05-03 19:27

To use a sprite you'll have to define styles for each category. You can use category codes for this. Then you just define styles in the stylesheet with background positions.

SED.by - создание сайтов, разработка плагинов и тем для Котонти
Bosco
#7 2011-05-05 14:44

@ kort

Didn't think of the cat codes. Thx man.

Can you help me out with the download image too?

Fooled around with it for 2 days now, tried all different kind of tags, but am currently stranded at:

 

<!-- IF {PAGE_FILE}> Yes  --><img src="img/filename.jpg"/> <!-- ENDIF -->

But then it will display the image in all the pages, including the ones that don't have a DL attached to it.

It probably is something very small that I am missing, but this is driving me nuts, so, could you, or someone else tell me what I need to put in there, or what I missed or didnt do?

 

 

GHengeveld
#8 2011-05-05 20:06
Try:

Dit bericht is bewerkt door Koradhil (2011-05-05 20:07, 12 jaren ago)
Bosco
#9 2011-05-05 20:52

All I see it a thin gray bar, Koradhil....

Added 16 hours later:

finally fixt this using the page_file_url tag. Now it works like I want. thx for the help lads.


Dit bericht is bewerkt door Bosco (2011-05-06 13:05, 12 jaren ago)