Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-01 22:34:21

alan
Member
From: earth
Registered: 2006-04-20
Posts: 14

How do I construct an article requiring subsequent image navigation?

I am trying to build a portfolio site where individual articles may link to alternate views of the same item. Ideally the first article article within any set of images would be the only one showing in any given navigation scheme, meaning “Portfolio Item #1” would show in a list, but “Portfolio Item #1b”, “Portfolio Item #1c,” etc. would not. Currently I am hard linking the multiple articles together to achieve the desired effect but I’d like to think there’s a more logical way to do this within Textpattern.

My current structure is typical: Section>Portfolio uses Page>Portfolio, and Articles use these to post. I use categories to list Articles by type.

Any help would be greatly appreciated.

Alan

Offline

#2 2007-12-02 09:09:29

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: How do I construct an article requiring subsequent image navigation?

if it’s just for images then I would regard 1 article = 1 portfolio item and then use something like hak_article_image. It has offset and limit attributes which means you can insert a whole series of images into the article image field separated by commas, then use hak_article_image with limit="1" (show only first image) for your portfolio preview image and hak_image_article with offset="1" (show from second image onwards) to show the rest of the images in the article view (i.e. the portfolio item) itself. The plug-in offers various ways of switching between images.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2007-12-02 16:17:40

alan
Member
From: earth
Registered: 2006-04-20
Posts: 14

Re: How do I construct an article requiring subsequent image navigation?

thanks jakob, this should work nicely. One thing I’ve found is that if you don’t have thumbnails the plugin substitutes the alt attribute, which you can style if you prefer text navigation. Maybe this is obvious in the support doc but I didn’t see it. edit: can’t recreate this. This became apparent when my thumbnail format (gif) didn’t match my image format (jpg), and txp kept throwing errors and substituting the alt for the img. (Is this a known bug?)

Last edited by alan (2007-12-02 19:36:52)

Offline

#4 2007-12-04 22:33:38

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: How do I construct an article requiring subsequent image navigation?

This became apparent when my thumbnail format (gif) didn’t match my image format (jpg)…

You can’t mix and match image formats for the same image.

… and txp kept throwing errors and substituting the alt for the img.

That’s caused by your browser when the image doesn’t exist, which it wouldn’t since it’s trying to look for a thumbnail+extension that doesn’t exist.

Offline

Board footer

Powered by FluxBB