Newbie: Add URL to content_image tag?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
donteatthat
New Member
New Member
Posts: 3
Joined: Fri Oct 14, 2011 5:09 pm

Newbie: Add URL to content_image tag?

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Newbie: Add URL to content_image tag?

Post 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.
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.
donteatthat
New Member
New Member
Posts: 3
Joined: Fri Oct 14, 2011 5:09 pm

Re: Newbie: Add URL to content_image tag?

Post 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
Post Reply

Return to “CMSMS Core”