Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-12-06 08:56:22

Gallex
Member
Registered: 2006-10-08
Posts: 1,071

Re: tag <txp:images />

etc wrote #315492:


<txp:images category="toetajad" wraptag="div" break="" class="partnerid" sort="date desc">...

oleg, could you comment your solution a bit? it’s hard to understand for me. ;) <+> – what is this?

Last edited by Gallex (2018-12-06 08:57:01)

Offline

#12 2018-12-06 11:01:50

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

Re: tag <txp:images />

Gallex wrote #315496:

<+> – what is this?

It’s a placeholder in wraptag attribute that will be replaced by the tag output. For example,

<txp:site_name wraptag="<h1>The name of my site is <i><+></i></h1>" />

will return

<h1>The name of my site is <i>Your Site Name</i></h1>

In your case wraptag will be not empty only if <txp:image_info type="alt" /> is set, in which case the image will be wrapped in <a ...></a>. And if it doesn’t need a title, you can simplify the block even more:

<txp:images category="toetajad" wraptag="div" break="" class="partnerid" sort="date desc">
    <txp:image wraptag='<txp:evaluate><a href=''<txp:image_info type="alt" />'' target="new"><+></a></txp:evaluate>' />
</txp:images>

etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB