Quote from: benchesters at Jul 05, 2009, 06:32 AM
Thanks for replies but as I say I’m a novice so they are not easy to understand!
I’m not clear on what you’re trying to do. but maybe this will help. If you just want to be able to set both the href and the image source while editing a document, one easy way to do it is with two template variables one for the url and the other for the image path. You could use a drop-down output type or radio buttons for the TVs. Or you could use an image TV that would let you browse to the image you want.
Then your html would look like this:
<a href="[*my_url_tv*]"><img src="[*my_image_tv*]" style="border-style: none" alt="test image"></a>
If you really want dynamic entries that are calculated on-the-fly as the page is rendered, you’ll need a snippet but it sounds like you may not. And we can’t help you with a snippet until you tell us how you want the urls and images to be selected by the snippet.
BTW, if all this is for a menu, you should consider using the Wayfinder snippet to generate the menu, in which case you’d take a somewhat different approach. Wayfinder will create the dynamic URLs automatically and they will always be correct regardless of what changes you make to the site.