Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [howto] Using the new image tags in Txp 4.3.0
Dragondz wrote:
Hi Stef may be you can use article_image like this:
sort='FIELD(ID,<txp:custom_field name="article_image" />)'
Undocumented feature. I tested it and confirmed that this outputs the raw value of article_image.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
Any progress on the txp:images offset problem?
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
damienbuckley wrote:
Any progress on the txp:images offset problem?
Just encountered this problem… Maybe this bug fix should go in release?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
the_ghost wrote:
Maybe this bug fix should go in release?
If you mean that you can’t specify an offset
without setting a limit
, we should probably fix <txp:linklist />
as well, which functions in exactly the same way (I modelled <txp:images />
on <txp:linklist />
). Nobody’s complained about that and it’s been like that since the tag was first written! Either way we should take this discussion off Jeff’s thread.
Last edited by Bloke (2010-11-16 11:46:01)
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
Re: [howto] Using the new image tags in Txp 4.3.0
Is there anything like txp:if_first_image
and txp:if_last_image
functionality in conjunction with txp:images
?
I did try replicating the corresponding functions for article/category/section with $thisimage
and assert_image();
but they did not function as I expected them to. I guess there’s a reason for that.
In the end I achieved what I wanted with a combination of jmd_count and txp:variable but it was a roundabout way of getting there.
TXP Builders – finely-crafted code, design and txp
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
jakob wrote:
Is there anything like
txp:if_first_image
andtxp:if_last_image
functionality in conjunction withtxp:images
?
No. The same holds for links and file downloads. Only articles have the notion of first and last at the moment.
I did try replicating… with
$thisimage
andassert_image();
but they did not function as I expected them to.
$thisimage
, $thislink
and $thisfile
don’t have entries for is_first
and is_last
so the only way to do it is via a plugin or some brief counting PHP. If jmd_count and txp:variable are the most efficient way of doing it then perhaps this should be a TXP tip?
Last edited by Bloke (2010-11-28 10:17:13)
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
Re: [howto] Using the new image tags in Txp 4.3.0
Thanks, Stef, for shedding light on that.
perhaps this should be a TXP tip?
Well I think this use case was a bit specific as most of the time you can simply place the closing statement after the closing </txp:images>
tag.
In my particular case I wanted to wrap every set of three images in a div (e.g. insert close ul + div and open a new div + ul after each third image) but not in the final case (which also happens to be divisible by three). The solution was find the total number of images from the category, then compare the current incrementing image number against that (like using {counter} and {totalimages} with smd_if / smd_gallery in the not-so-old-days).
TXP Builders – finely-crafted code, design and txp
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
j_soo i tried your gallery example and i get this error:
Tag error: <txp:image_list form="gallery_demo_1" break="" /> -> Textpattern Warning: tag does not exist on line 1183
Wonder what I’m doing, i am using the latest version of txp…
-thanks
its a bad hen that wont scratch itself.
photogallery
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
kvnmcwebn wrote:
tag does not exist…
<txp:image_list>
was renamed to <txp:images> at the last minute.
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
Re: [howto] Using the new image tags in Txp 4.3.0
Sorry about that; example code updated.
Code is topiary
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
oh thanks guys. jsoo that example is great btw.
its a bad hen that wont scratch itself.
photogallery
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
hi jsoo, in this example
http://gallery.ipsedixit.net/category/image/fear/
How are you getting the images not to the page?
When I try it the selected image reloads on it’s own blank page without the thumbs.
Thanks
Kevin
edited to ask:
what is the image context?
Last edited by jsoo (2011-04-10 16:26:47)
its a bad hen that wont scratch itself.
photogallery
Offline