Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-06-22 12:24:26

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

<txp:images /> usage and such

Hello all,

i am hoping that someone could help me with a situation that I am having with a website that I am building. I am using the <txp:images /> tag to display a series of images on a slide show on my homepage.

here is what I have:

<div id=“featureMain”> <div class=“slides”> <txp:images sort=“id asc” form=“slides” limit=“7” category=“GamePicts” /> </div> <div class=“navSlides”></div> </div>

Now GamePicts will contain parent categories of a series of matches. I want to be able to display the 7 latest pictures. The parent categories will , most likely be the match date, is the a sub-level tag that I can adto this tag? or is there something that I am missing?

Please help
Thanks

Last edited by pafruu (2011-06-22 12:24:55)


I try, and I try, and I try…. and sometimes I achieve

Offline

#2 2011-06-22 12:41:51

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,549
Website GitHub Twitter

Re: <txp:images /> usage and such

Hi

There is no children atribute to txp:images tag, then a workarround would be using txp:category_list

<txp:images sort=“id asc” form=“slides” limit=“7” category='<txp:category_list parent="GamePicts" break=","><txp:category /></txp:category_list>' />

Cheers

Offline

#3 2011-06-22 13:13:39

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

Re: <txp:images /> usage and such

hmmm I tried that but it didnt work


I try, and I try, and I try…. and sometimes I achieve

Offline

#4 2011-06-22 13:33:54

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,549
Website GitHub Twitter

Re: <txp:images /> usage and such

Sorry try this:

<txp:images sort="id asc" form="slides" limit="7" category='<txp:category_list parent="GamePicts" break="," type="image"><txp:category /></txp:category_list>' />

Bloke: swapped curly quotes for straight quotes

Last edited by Bloke (2011-06-22 14:08:00)

Offline

#5 2011-06-22 14:08:52

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

Re: <txp:images /> usage and such

this time I got a visual but it was text and all i saw were the names of the sub-categories


I try, and I try, and I try…. and sometimes I achieve

Offline

#6 2011-06-22 14:10:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,947
Website GitHub

Re: <txp:images /> usage and such

pafruu wrote:

this time I got a visual but it was text and all i saw were the names of the sub-categories

Did you make sure to use straight quotes, not the curly ones posted by Dragondz? I just fixed the post to swap the quotes out. Apologies if you tried that and it’s some other issue with the code itself — I haven’t tried it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#7 2011-06-22 14:35:12

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

Re: <txp:images /> usage and such

Thanks Bloke and Dragondz, I now have a visual but for some odd reason, the image are lowering themselves in the display

see here: www.hubcitybrewers.com/home

in my slides form here is what I have:

<div class=“slide”>
<txp:image />
</div>

and the class:

.slide { width:688px; height:361px; float:left;}

which was never a problem before, please help


I try, and I try, and I try…. and sometimes I achieve

Offline

#8 2011-06-22 14:44:20

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,549
Website GitHub Twitter

Re: <txp:images /> usage and such

there is extra br between each image!!

add

break="" to txp:images

Last edited by Dragondz (2011-06-22 14:44:51)

Offline

#9 2011-06-22 14:45:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,947
Website GitHub

Re: <txp:images /> usage and such

pafruu wrote:

the image are lowering themselves in the display

You have a <br /> tag after each div. This is probably caused by the txp:images tag itself — the default is break="br" so you will have to use break="" to remove them.

EDIT: Dragondz was the nimbler typist :-)

Last edited by Bloke (2011-06-22 14:46:26)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#10 2011-06-22 14:52:04

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,549
Website GitHub Twitter

Re: <txp:images /> usage and such

Bloke a écrit:

Dragondz was the nimbler typist :-)

Only for today ;)

Offline

#11 2011-06-22 15:12:10

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

Re: <txp:images /> usage and such

wow thanks guys it worked !!


I try, and I try, and I try…. and sometimes I achieve

Offline

#12 2011-07-14 06:16:24

admi
Member
From: BY
Registered: 2007-12-10
Posts: 145
Website

Re: <txp:images /> usage and such

I did not want to start a new thread for a question related to< txp:images> or, to be more exact, to a simple gallery with thumbnails, something like here I play with . The code is this

<txp:images> <txp:thumbnail id="5" poplink="1" /> <txp:image_info /> </txp:images>

and we see a thumbnail and if we click on it the full size image will pop up. The question is how to get the image title instead of its name like on the pic below:

This same question bothered me when I used rss_thumbpop which is very similar.

Offline

Board footer

Powered by FluxBB