Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-11-10 17:57:40
- Vdogg
- New Member
- Registered: 2005-11-10
- Posts: 5
How to make an image link in textpattern??
What is the code in textpattern that will enable me to click a small image and link to a larger image?
I tried using standard code and it wont work. Please help. How can I do this step by step?
Thanks
Offline
Re: How to make an image link in textpattern??
<txp:thumbnail id="23" poplink="1" />
will display the thumbnail for image 23 and will open image 23 in a popup when clicked. Otherwise you can always just link to it normally. <a href="/path/to/full image/"><img src="/path/to/thumbnail/"></a>
Shoving is the answer – pusher robot
Offline
#3 2005-11-10 19:34:50
- Vdogg
- New Member
- Registered: 2005-11-10
- Posts: 5
Re: How to make an image link in textpattern??
Sounds Good Thanks
Offline
#4 2005-11-22 05:34:59
- sunmanx
- New Member
- Registered: 2005-11-18
- Posts: 2
Re: How to make an image link in textpattern??
This isn’t working with my gallery. Is there another way to popup images in a new popup window (without installing a bunch of plugins) when a user clicks a thumbnail?
I tried {txp:thumbnail id=“23” poplink=“1” /> and {txp:image_index break=”“ poplink=“1” /> but both ways seem to just show the larger image under the thumbnails making the page look horrible.
The website is located @ http://www.freehandesigns.com/ and this is the code I have at the moment.
{!— center —>
{div id=“content” class=“img-shadow”>
{center>
{txp:image_index break=”“ />
{/center>
{/div>
Last edited by sunmanx (2005-11-22 05:44:12)
Offline
#5 2005-11-22 06:05:17
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: How to make an image link in textpattern??
Every single one of the images here:
http://www.hexseven.com/freehand/gallery/?c=paintings
is a thumbnail. I know for a fact, because of the image names. For example:
http://www.hexseven.com/freehand/images/13t.jpg
Obviously, you’ve misunderstood something somewhere.
1. You upload your image.
You’ll get a preview of the image, where you can enter more data about the image. Here, before you enter any other data:
2. Enter a width and/or height you want your thumbnail to be.
If you enter just one, it will resize to that width or height, and the other one will scale. If you enter both, it will force the resize, but you need to be careful with your math or the image will look squashy. In that event, also click the “crop” checkbox.
3. Click the “create” thumbnail button.
4. When you’re satisfied that your thumbnail is perfect, fill in the rest of the details of your image and hit save.
Then the built-in and plugin tags that work with thumbnails will behave properly.
Offline
Re: How to make an image link in textpattern??
Well I have always used a “t” in your first example. According to the tag reference it isn’t required but I have always used it and I don’t generally do something for nothing. Anyway I would use something like <code><txp:thumbnail id=“23t” poplink=“1” alt=“something” style=“somestyle” /></code>. Of course using this tag does assume that you have used TXP’s image upload facility and that you have associated the thumbnail with the main image otherwise forget it..
Your second example will never work. You cannot use poplink with the <code><txp:image_index /></code> tag. It is designed to be used with the <code><txp:image_display /></code> tag who’s placement determines where the larger image is displayed. Again, the use of TXP’s own image upload facility is assumed.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#7 2005-11-22 21:01:33
- sunmanx
- New Member
- Registered: 2005-11-18
- Posts: 2
Re: How to make an image link in textpattern??
{txp:image_index break=”” />
With the above line, the gallery looks exactly the way I want it to, but is there not a way to make it popup the fullsize image in a popup window when you click a thumbnail instead of showing it below all the thumbnails?
Offline
Re: How to make an image link in textpattern??
I’m afraid not. Those 2 tags are really something that Dean developed for himself way back when he started coding TXP for his own use. They haven’t been developed since then. Whether they will in the future or not I have no idea as we do have a number of image gallery plug-ins available, but there’s nothing to stop you putting a request into the “Feature Request” forum. You never know your luck. I would suggest you give reasons for your request though. Something that others would find useful. The fact that one person wants something isn’t going to be a good reason for the devs to spend time on this. Even better, if you are any good at coding, would be to develop it yourself and submit a patch. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline