Skip to Content
 

Help with nanDeck and images

2 replies [Last post]
MayuPolo
Offline
Joined: 11/12/2012

Hello,

I am hoping to find some more experienced nanDeck users on here.

Basically I am running into issues when creating a deck where a different number of images needs to be shown on different cards.

Basically, there is a row of icons on the card, but there can be 1 to 3 different icons depending on the card (being pulled from a linked csv file). I have added three "image" elements but as soon as I hit a row in the csv where for example, the cell for the second image is empty the whole layout for the images is broken.

Do I have to add "blank" images to the empty cells or is there a better way of solving this?

Thanks!

Zag24
Offline
Joined: 03/02/2014
IF .. ENDIF

You can use IF ... ENDIF to execute the IMAGE command only if there is a value for the image.

nand
nand's picture
Offline
Joined: 07/27/2008
There are two ways, depending

There are two ways, depending on how do you want the empty images to be displayed:

1) with IMAGE:

- CSV file:

card,img1,img2,img3
1,apple.png,orange.png,pear.png
2,orange.png,,
3,pear.png,,apple.png

- script:

link=data.csv
[all]=1-{(card)}
IMAGE=[all],[img1],0,0,33%,33%,0,P
IMAGE=[all],[img2],33%,0,33%,33%,0,P
IMAGE=[all],[img3],66%,0,33%,33%,0,P

Result:

http://www.nand.it/img/bgdf01.jpg

2) with ICON/ICONS:

- CSV file:

card,img
1,aop
2,o
3,pa

- script:

link=data.csv
[all]=1-{(card)}
ICON=[all],a,apple.jpg
ICON=[all],o,orange.jpg
ICON=[all],p,pear.jpg
ICONS=[all],[img],0,0,100%,33%,33%,33%,0,P

Result:

http://www.nand.it/img/bgdf02.jpg

Syndicate content


forum | by Dr. Radut