Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[textile] image caption with textile
hello forum,
is there a way to output image captions using textile?
thanks, christoph
Offline
#2 2012-03-31 22:42:34
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [textile] image caption with textile
Offline
Re: [textile] image caption with textile
I don’t think that textile can parse captions but image_info does.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [textile] image caption with textile
You’ll be interested in the next Extensional(ism) article in TXP — Issue 2. That’s all we can tell you right now. Work-in-progress. You’re going to love it.
Offline
Re: [textile] image caption with textile
hi all,
thanks for your replies. not sure, if upm_textile can help but will give it a try. what i need is an as easy as possible solution for my clients which i don’t want to deal with txp tags – they have enough to do learning textile (would love to have some feedback: what’s your client’s feedback on textile? do they accept it or do they want wysiwig editors?).
i’m very curious to read txp mag’s issue 2 and what it has to tell me about this topic.
Offline
Re: [textile] image caption with textile
I think upm_textile as suggested above – or smd_wrap – can do that for you. Just ask your client’s to use textile in the caption as they would in an article field.
In your template, wrap the image_info tag with the corresponding tag, e.g.
<txp:upm_textile><txp:image_info type="caption" /></txp:upm_textile>
or
<txp:smd_wrap transform="textile"><txp:image_info type="caption" /></txp:smd_wrap>
Your clients don’t need to fuss with the txp:...
tags at all if you put them in your page or form templates.
The only thing to consider is that these fields are textiled on the fly and that that can place a load on the server if doing a lot of it. Captions I suspect are short, so unless your page consists of 100s of images at once, the additional server load is negligible. And if that really is a problem you could also use caching.
TXP Builders – finely-crafted code, design and txp
Offline
Re: [textile] image caption with textile
hi jakob,
my apologies, i should have been more clear with my question. i was looking for a way to insert images together with their caption in an article on the write tab (it’s a blog post with several images). like this
"(linkclass)!/images/22t(Das ist der Alternativtext)!":/images/22.jpg
from my experience, only one image per article often isn’t enough.
best, christoph
Offline
Re: [textile] image caption with textile
totoff wrote:
i was looking for a way to insert images together with their caption in an article on the write tab
As far as I know you can’t add captions with Textile. But you can put a comma-separated list of image IDs in the Article Image field and render them as a gallery using the images tag.
Unless you’re going to add them in your template, that implies people writing markup in your articles which can be difficult to explain. So what I’ve done very successfully in the past is write an smd_macro to do it. Then clients just need to enter <txp:gallery />
(or whatever) and it puts the correct code in, complete with captions. And of course you can allow them to customise the tag if you wish with attributes.
Hope that helps.
Last edited by Bloke (2012-04-02 08:25:27)
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: [textile] image caption with textile
hi stef,
actually i already had a look at smd_macro as an option but had no time to investigate further. another alternative could be this jquery plugin. i’ll try out and report back.
many thanks for your kind support.
Offline
Re: [textile] image caption with textile
jakob wrote:
upm_textile as suggested above – or smd_wrap or
Can rah_function’s current development version join the party too. As it now has class method support, it can do Textile too.
<txp:rah_function call="Textile->TextileThis">h1. Hello World</txp:rah_function>
Unfortunately it doesn’t (yet?) autoload files, but that would work if the Textile class (classTextile.php) were loaded on the page.
Offline
Re: [textile] image caption with textile
Hi Christoph,
i was looking for a way to insert images together with their caption in an article on the write tab (it’s a blog post with several images).
Maybe you are looking for yab_image
Here with some explanations and examples.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: [textile] image caption with textile
hi forum,
thanks to everybody who replied to this post. for the moment i decided to go with the jquery plugin i mentioned earlier. it works fine with textile:
"(fancybox)!(caption)/images/22t(my caption)!":/images/22.jpg
i know, this is off topic: trenc, you have a nice website online for NRW tourismusmagazin. did you build it with txp?
best regards, christoph
Offline