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
Newbie: Add URL to content_image tag?
-
- New Member
- Posts: 3
- Joined: Fri Oct 14, 2011 5:09 pm
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Newbie: Add URL to content_image tag?
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.
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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
- New Member
- Posts: 3
- Joined: Fri Oct 14, 2011 5:09 pm
Re: Newbie: Add URL to content_image tag?
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
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