Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-11-06 12:41:50

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Opportunity to add new attribute(s) into the <txp:image_url /> tag

Some javascript solutions refer to a “class” attribute for links in order to display photo galleries. Others use a “rel” attribute which is unfortunately not valid in HTML5 (e.g.: shadowbox.js). Furthermore, there is a rise of the HTML5 custom data attributes (“data-”).

So, what do you think about that?

Last edited by Pat64 (2014-11-06 12:42:16)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2014-11-06 12:55:59

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

Re: Opportunity to add new attribute(s) into the <txp:image_url /> tag

What’s wrong with using it as a single tag and rolling your own?

<txp:images category="gallery">
   <a href="<txp:image_url />" class="linkclass" data-photographer="<txp:image_info type="author" />">
      <txp:thumbnail />
   </a>
</txp:images>

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

#3 2014-11-06 16:47:12

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Opportunity to add new attribute(s) into the <txp:image_url /> tag

:) :) :)

Perfect. It seems obvious I’ve got difficulties with this tag!

Thanks lot Stef.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#4 2014-11-06 21:32:23

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Opportunity to add new attribute(s) into the <txp:image_url /> tag

And if you need to use that a lot in your body field, you can make an smd_macro out of it :-)


TXP Builders – finely-crafted code, design and txp

Offline

#5 2014-11-21 17:16:57

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Opportunity to add new attribute(s) into the <txp:image_url /> tag

Yep!

Thanks Jakob (good idea)

;)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB