Foren / Cotonti / General / cat icon & sprite

Bosco
#1 1. Mai 2011, 15:00

is that possible with Cotonti in a simple manner?

Trustmaster
#2 1. Mai 2011, 15:34

Could you explain what you want in detail please?

May the Source be with you!
Bosco
#3 1. Mai 2011, 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 3. Mai 2011, 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 3. Mai 2011, 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.


Dieser Beitrag wurde von Bosco (am 3. Mai 2011, 15:03, vor 13 Jahre) bearbeitet
Kort
#6 3. Mai 2011, 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 5. Mai 2011, 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 5. Mai 2011, 20:06
Try:

Dieser Beitrag wurde von Koradhil (am 5. Mai 2011, 20:07, vor 13 Jahre) bearbeitet
Bosco
#9 5. Mai 2011, 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.


Dieser Beitrag wurde von Bosco (am 6. Mai 2011, 13:05, vor 13 Jahre) bearbeitet