Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-11-22 13:52:46

Szorstki
Member
From: Poland
Registered: 2012-05-27
Posts: 20

Images enlargement from txp:images don't work

On my site I’ve used

<txp:images category="some-category" break=" "/>

To create a simple gallery.
Images are visible with thumbnails, but after clicking them, there is only a blank page. How do I make TXP to display larger image after choosing one from thumbnails generated with txp:images?

Offline

#2 2013-11-22 14:22:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

Re: Images enlargement from txp:images don't work

Hi Pawel
You could try

<txp:images category="some-category" break="span"><a href="/images/<txp:image_info type="id" /><txp:image_info type="ext" />"><txp:thumbnail /></a></txp:images>

Last edited by colak (2013-11-22 14:26:48)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2013-11-22 14:59:24

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Images enlargement from txp:images don't work

According to your site you produce this HTML:

<p>
	<a href="http://www.bsstarozreby.pl/news/?c=blichowo-festyn&amp;context=image_context&amp;p=44"><img src="http://www.bsstarozreby.pl/images/44t.jpg" alt="" /></a>
	<a href="http://www.bsstarozreby.pl/news/?c=blichowo-festyn&amp;context=image_context&amp;p=43"><img src="http://www.bsstarozreby.pl/images/43t.jpg" alt="" /></a>
	<a href="http://www.bsstarozreby.pl/news/?c=blichowo-festyn&amp;context=image_context&amp;p=42"><img src="http://www.bsstarozreby.pl/images/42t.jpg" alt="" /></a>
</p>

That means, you don’t link to a image and I don’t know from where comes the following parts of your link:

?c=blichowo-festyn&amp;context=image_context&amp;p=44

I would suggest a slightly different code than that of colak:

<txp:images category="some-category" break="element-of-your-choice">
	<a href="<txp:image_url />" class="something-for-lightbox" title="<txp:image_info />"><img src="<txp:image_url thumbnail="1" />" alt="<txp:image_info type="alt" />" /></a>
</txp:images>

Replacing <txp:thumbnail /> by, for example, <img src="<txp:image_url thumbnail="1" />" alt="<txp:image_info type="alt" />" />, you can better customize what attributes do you want to output.

Last edited by GugUser (2013-11-22 15:01:03)

Offline

#4 2013-11-22 16:15:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

Re: Images enlargement from txp:images don't work

And GugUser’s suggestion is actually better:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2013-11-22 16:51:44

etc
Developer
Registered: 2010-11-11
Posts: 5,393
Website GitHub

Re: Images enlargement from txp:images don't work

Offline

Board footer

Powered by FluxBB