Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Adding a Class to a Link to an Image using TXP/Textile
Hello,
I want to have an individual’s mugshot popup in a modal window (probably Fancybox) when one mouses over his/her name in an article narrative. How does one textpatternize/textilize <a class="fancybox" href=http://mysite.com/images/100.jpg >Joe Soap</a>
? I’m having an extended mental blank here.
Offline
Offline
Re: Adding a Class to a Link to an Image using TXP/Textile
Thanks Jukka. So simple and elegant yet so damned elusive to me until now.
Last edited by joebaich (2010-10-07 02:30:49)
Offline
Re: Adding a Class to a Link to an Image using TXP/Textile
Same question but also now a requirement to include a caption under the image?
Offline
Re: Adding a Class to a Link to an Image using TXP/Textile
Hi Joe
you have to use either of stef’s or mary’s plugin or if you are using the latest txp release check out image_info
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: Adding a Class to a Link to an Image using TXP/Textile
Hello Yiannis,
Yes, I understand that bit, my question was framed in the context of the original,
I asked
I want to have an individual’s mugshot popup in a modal window (probably Fancybox) when one mouses over his/her name in an article narrative. How does one textpatternize/textilize <a class=“fancybox” href=http://mysite.com/images/100.jpg >Joe Soap</a> ? I’m having an extended mental blank here.
Apologies for being idle. I want to do the same thing in an article narrative and have a caption under the resultant image. I am using TXP4.3 and so <txp:article_info />
is a probably a good way to go. It’s really all about giving a user with limited permissions the ability to have ad-hoc images pop up in a modal window from a contextual text link in her article. She is happy with Textile but is sensibly reluctant to get involved any deeper in the backend. She’s OK too with TXP tags provided she has a crib.
Offline
Re: Adding a Class to a Link to an Image using TXP/Textile
Here follows a bit of thinking out loud.
This ties in to some recent discussions about extending Textile. As suggested by Steve in response to a question of mine, this might be a good case for making a custom shorthand for this client. So that, for example, she enters !!43!!
and this gets replaced (at page-view time) by a pre-formatted block of Txp tags that includes the image caption from the DB. Or if she wants some flexibility with how to mark up the caption, devise a custom Textile tag for image captions alone.
Code is topiary
Offline