Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-26 17:32:18

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Pg w/ fullsize image linked from thumbnail inside individual articles?

I’ve created a portfolio section that displays a list of portfolio pieces (each an individual article) which includes a thumbnail, and the excerpt.

When each individual article is viewed, I show the thumbnail again and a longer writeup. I’d like this thumbnail to be linked to a normal page with the full size image on it (as opposed to just the full size image file with no navigation, etc).

I don’t want this view to pop open a new window.

I thought hak_article_image was the answer but I’m not having any luck. There must be a way to do this. What am I missing?

Any help greatly appreciated.

Offline

#2 2009-03-26 21:12:48

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Pg w/ fullsize image linked from thumbnail inside individual articles?

hak_article_image is designed specifically for this kind of scenario.

You need to have a page that has <txp:image_display /> then you can use a linktype of section or section-category in hak_article_image to link to it. You also need to tell it what section an or category to use through the section and category attributes.

For example:

<txp:hak_article_image link="1" linktype="section" section="pictures" /> 

will create a Link pointing to the section pictures passing p=image-id which can be picked up by <txp:image_display /> or by <txp:hak_article_image urloverride="1" />.

All the options are int the help.


Shoving is the answer – pusher robot

Offline

#3 2009-03-28 19:01:09

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Re: Pg w/ fullsize image linked from thumbnail inside individual articles?

Thank you! This worked nicely.

I ended up doing it a bit differently because I decided I wanted a little different user experience, and thought I should post the alternate solution in case it can help someone else. In order for the thumbnails to shrink/enlarge on the same page as the individual article I installed adi_gps and then did this:

<txp:adi_gps name="mode" quiet="1"/>
<txp:if_variable name="mode" value="full">
<a href="?mode=thumb"><txp:article_image />
<br />[-]Shrink</p></a>
<txp:else />
<a href="?mode=full"><txp:article_image thumbnail="1" class="left" />
<br />[+] Enlarge</a>
</txp:if_variable>

Offline

Board footer

Powered by FluxBB