Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[howto] Using the new image tags in Txp 4.3.0
I know it’s still at release candidate stage, but I wanted to put 4.3.0’s new image tags through their paces. I’m impressed, and quite expect to dismantle soo_image into one or two small & specialized plugins. Because the new core tags do pretty much everything I need.
Herewith, a demo with code and examples. Pure Txp, no plugins.
Edit, 2011-04-10: new URL
Last edited by jsoo (2011-04-10 16:23:22)
Code is topiary
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
Great idea, great examples! Thanks.
Offline
#3 2010-09-28 11:44:27
- candyman
- Member
- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: [howto] Using the new image tags in Txp 4.3.0
I wanted to use soo_image in the past but I waited for this reason: I’m going to wait for the “lite editions” for specialized functions, using the core ones for basic image handling.
Thanks for the demos: very useful
Last edited by candyman (2010-09-28 15:30:56)
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
Niiiiiiice!
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
Offline
#5 2010-09-28 16:11:55
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: [howto] Using the new image tags in Txp 4.3.0
Very nice indeed.
Excellent that this is now possible with just the core.
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
Crikey!
Keith
Blyth, Northumberland, England
Capture The Moment
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
Question: I note the Photoblog example above assume one image per article. soo_image allows several. Is that possible in TXP 4.3.0, or is that still the domain for a plugin?
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
Yes, image_list
understands a comma-separated list in the article-image field. See the demo’s ‘et cetera’ page.
Edit, 2011-04-10: updated URL
Last edited by jsoo (2011-04-10 16:24:18)
Code is topiary
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
johnstephens wrote:
assume one image per article
Officially, the article image field is to hold one ID only. But the <txp:image_list />
tag — without any other selection attributes — will treat the article image field as a comma separated list of IDs if it’s set as such.
Edit: too late :-)
Last edited by Bloke (2010-09-28 19:30:28)
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
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
That’s awesome, Jeff. Thanks! (Silly of me not to read et cetera before posting.)
Stef, is that a behavior I can count on for the future? Associating multiple images with an article in this way is very useful. I only ask since you said “officially” the pairing of articles to images is 1:1.
Offline
Re: [howto] Using the new image tags in Txp 4.3.0
Where can we vote for width/height attrs for thumbnails? :)
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
johnstephens wrote:
is that a behavior I can count on for the future?
Yup. The <txp:article_image />
tag will continue to function as it always did only supporting a single image, but it didn’t make sense for <txp:image_list />
to obey the same logic. So I made it understand a list of IDs if they were present (or just a “list” of one image if the article image field was used as in 4.2.0).
If you want any more esoteric functionality like using a list of category names in the article image field, then it’s plugin land or abuse the system with tags-in-tags.
EDIT: stupid, brain-dead code example removed
Last edited by Bloke (2010-09-29 08:12:46)
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
Offline