Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-03-20 15:16:43
- carrotrope
- Member
- From: Edinburgh
- Registered: 2007-03-16
- Posts: 39
Linking article_images per post
Hi all,
As you can see from the testing page available here, I’m in the process of setting up a daily design-focused blog that for every entry, features a 500×333 image on the left hand side. Currently I’m using Article Image to specify what this is – but ideally, I’d love to also specify (in every individual post) a link that that clicking the article image should take you to. Is this possible? How would you go about it?
Thanks
Jez.
Offline
Re: Linking article_images per post
Where do you want it linked to? Is it information that is already being captured?
Just from looking at the site would you want the image to link to http://www.yay.com for example?
My first thought would be to capture the url in a custom field and then build the link in your article form.
Last edited by hakjoon (2007-03-20 15:51:56)
Shoving is the answer – pusher robot
Offline
#3 2007-03-20 16:28:25
- carrotrope
- Member
- From: Edinburgh
- Registered: 2007-03-16
- Posts: 39
Re: Linking article_images per post
Hi hakjoon,
The links would be to external sites that would also feature as a text link in the body of the article itself. There would be a different link for each post so setting the article form each time won’t work. How do I create a custom field and apply it to the article image for every image?
Jez.
Offline
Re: Linking article_images per post
Go to Admin -> Preferences -> Advanced and name one of the Custom Fields something that would make sense. I’m going to use Url for this example. Pu the url you want the article image to link to in this custom field.
In your article form you can then do:
<a href="<txp:custom_field name="Url" />"><txp:article_image /></a>
Shoving is the answer – pusher robot
Offline
#5 2007-03-21 00:41:03
- carrotrope
- Member
- From: Edinburgh
- Registered: 2007-03-16
- Posts: 39
Re: Linking article_images per post
Works like a charm, thanks very much!
Offline
Pages: 1