Page 1 of 1
Newbie: Add URL to content_image tag?
Posted: Fri Oct 14, 2011 5:29 pm
by donteatthat
Hi there, total newbie here, so I have the content_image tag in a template and great I can select which image i want in the page editor, how the heavens do I add a URL to this image, say for example if its a "go to this page" image?
Thank you for looking,
Simon
Re: Newbie: Add URL to content_image tag?
Posted: Fri Oct 14, 2011 5:44 pm
by calguy1000
Well, there are a number of things you could do.
i.e: something like: <a href="http://somesite.com">{content_image block='image'}</a> would display the image, and link it to that url.
<a href="{cms_selflink href='home'}">{content_image block='image'}</a> would generate a link to your home page and wrap it around the selected image.
{content_image block='image' assign='foo'}{cms_selflink page='home' text=$foo} should probably do about the same thing.
You could get funky with javascript.
There are a thousand variations, and it all depends on what you are trying to achieve.
Re: Newbie: Add URL to content_image tag?
Posted: Sun Oct 16, 2011 1:06 pm
by donteatthat
Hi there thank you for your reply.
I guess what Im trying to do is something like..
{content_image block='image' url_target='
http://www.mysite.com'}
so when you're in the page editor, not only can you select an image but also what link it will go to?
Thanks,
Simon