| Previous · Next | |
| User | Message |
|
xootom
|
Date: 4/22/2011 11:21 am · Subject: Creating a navigation using images · Rating: -1
I'm creating a product catalogue using WebGUI, and want to be able to choose a thumbnail to open a page. If each sub item is an article with an image, can I use a tmpl_var in a navigation template to bring in the articles' image thumbnail? --- (Edited on 22-04-2011 17:21:24 [GMT+0100] by xootom) --- |
| Back to Top |
Rate [ | ]
|
|
perlDreamer
|
Date: 4/22/2011 6:41 pm · Subject: Re: Creating a navigation using images · Rating: -1
If you only wanted the image stored in the Article, you could use the FileUrl macro to get it. But if you want thumbnails that would require a custom macro. --- (Edited on 4/22/2011 4:41 pm [GMT-0700] by perlDreamer) --- |
| Back to Top |
Rate [ | ]
|
|
xootom
|
Date: 4/22/2011 6:58 pm · Subject: Re: Creating a navigation using images · Rating: -1
Thanks Pd. The image itself would be fine and I can reduce its dimensions. In a menu template the sub-item's URL is accessible in the page_loop as tmpl_var page.url, I tried passing this through the FileUrl macro but get a URL coming out containing 'the asset you requested does not have a filename property.' Do I need to loop again within page_loop, is there any documentation? --- (Edited on 23-04-2011 00:58:14 [GMT+0100] by xootom) --- |
| Back to Top |
Rate [ | ]
|
|
perlDreamer
|
Date: 4/23/2011 3:15 pm · Subject: Re: Creating a navigation using images · Rating: -1
There is documentation in the wiki, I should have read it before recommending the FileUrl macro. It specifically says that it won't work with Assets that will store multiple images, like the Article. So you're going to need to write a small, custom macro that will work exactly like the FileUrl macro, except that it shows the first image that it finds in the storage location. --- (Edited on 4/23/2011 1:15 pm [GMT-0700] by perlDreamer) --- |
| Back to Top |
Rate [ | ]
|