Textpattern Forum

You are not logged in. Register | Login | Help

#1 2011-08-12 13:33:59

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 716
Website

[wiki] <txp:images />

The images tag is awesome.
I know it’s been out for a while now but whoever thought of the latest txp image capabilities was really thinking about artists, designers and photographers. Thanks.


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2011-08-12 15:38:05

Destry
Moderator
From: Strasbourg, France
Registered: 2004-08-04
Posts: 2,336
Website

Re: [wiki] <txp:images />

The images tag, could use some love in the docs, so if you have some nifty tag-use examples for it, add them in or add them to this thread for someone else to add in.

Maybe we should move this thread to User Docs, since I’d like to turn it into such. :)

Ed. I edited the thread title for clarity, and towards a new thread titling convention I’d like to get caught-on in the user docs forum when it concerns a given tag. :)

Last edited by Destry (2011-08-13 00:00:35)

Offline

#3 2011-08-12 18:12:04

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,175
Website

Re: [wiki] <txp:images />

My only wish for <txp:images/> is if it could automatically tell if you have a image category name in your article_image field.


My Plugins

Piwik Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#4 2011-08-13 19:33:15

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 716
Website

Re: [wiki] <txp:images />

Ok I have a couple examples I will post here later.


its a bad hen that wont scratch itself.
photogallery

Offline

#5 2011-08-15 19:49:46

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 716
Website

Re: [wiki] <txp:images />

Ok here is a very simple but handy usage of the images tag. It will display a list of images by category in an article. It uses far less code than using the old image tag and is far handier. The article image thumbnail will show up on your section page with a thumbnail linked to the article. The article displays the category list of images. It is very useful if you have some kind of photo portfolio and want to display a series of images or “photo essays.” Also it works well with javascript slide shows, For my personal work I have gone off slide shows in favour of lists of images on a page that has a fixed header. To see what I mean visit my example page link at the bottom.

Step 1.
First create and image category and upload your images.
Note. One of the image id’s will be used in the article image for the thumbnail/link.

Step 2.
Put the images tag inside your article:

<txp:images category="watercolour" form="essays" wraptag="ul" break=""   />

Step 3
Create the form with the image and image_info tags. Image info will put the caption beneath the image:

<txp:image  class="essays" wraptag="li" class="imagelist" break=" " />
<txp:image_info break="li" breakclass="imageinfo"  />

Step 4
Create the code for the page:

<txp:if_individual_article><txp:article form="slides" status="sticky"/>
<txp:else />
<div id="thumbarea">
 .......
<ol id="thumbs">
<txp:article_custom form="mythumbform"  section="mysection" status="sticky" />
</ol></txp:if_individual_article>

Variation for slide shows

<txp:if_individual_article>
<div id="nivoslider">
<txp:article form="slides" status="sticky"/>
</div>
<txp:else />
<div id="thumbarea">
 .......
<ol id="thumbs">
<txp:article_custom form="mythumbform"  section="mysection" status="sticky" />
</ol></txp:if_individual_article>

Note:
I used sticky status to keep the articles off the homepage of my blog. There is probably a better way but it works for me. Also there may be betters ways of doing this so ask someone more experienced first.

example

Last edited by kvnmcwebn (2011-08-17 08:51:59)


its a bad hen that wont scratch itself.
photogallery

Offline

#6 2011-08-15 20:44:03

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 716
Website

Re: [wiki] <txp:images />

Here are some links for good slide show creators:

Nivo slider, only does same sized images.

http://nivo.dev7studios.com/

cycle: Handles odd sized images:

http://jquery.malsup.com/cycle/


its a bad hen that wont scratch itself.
photogallery

Offline

#7 2011-08-17 06:24:01

Destry
Moderator
From: Strasbourg, France
Registered: 2004-08-04
Posts: 2,336
Website

Re: [wiki] <txp:images />

Kevin,

I haven’t tried it, but it looks like a nice tutorial. It might even be better placed in TXP Tips since it’s involving a fair bit more code than just a simple tag example for images. But I’ll have a look at it later when I get a chance and see if it can be included in the wiki page more succinctly.

Thanks for stepping up!

Offline

#8 2011-08-17 08:50:57

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 716
Website

Re: [wiki] <txp:images />

Ok.
Feel free to make changes as you see fit.


its a bad hen that wont scratch itself.
photogallery

Offline

#9 2011-08-17 13:05:54

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 476
Website

Re: [wiki] <txp:images />

Destry wrote:

It might even be better placed in TXP Tips since it’s involving a fair bit more code than just a simple tag example for images.

Since I brought up the whole Related Plugins idea last week, I am willing to go out on a limb and suggest a section for External Tutorials as well.


Textpattern Community Member since 2004-02-23 | World Headquarters

Offline

#10 2011-08-20 09:06:42

Destry
Moderator
From: Strasbourg, France
Registered: 2004-08-04
Posts: 2,336
Website

Re: [wiki] <txp:images />

Michael,

I like that idea; still keeps things in context and starts to make stronger bridges with related topics in TXP Tips. Good call.

Offline

Board footer

Powered by FluxBB