Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-10-27 14:34:44

RepoPrez
Member
Registered: 2008-03-01
Posts: 10

gallery issues

Forgive me, I know this has probably already been addressed somewhere in this forum..

I am trying to create a gallery using TXP tags but I am having difficulty including a caption/description that has been input for each image.

Currently, I have a ‘gallery’ page that is set to a ‘gallery’ section. I point the URL to pull a certain image category (ie http://www.jonathanevega.com/gallery/?c=audrey) that displays the image + index for that catrgory, but gives me the following error: Tag error: <txp:image_info type=“caption” /> -> Textpattern Notice: error_image_context on line 2344
I have tried other options (ie creating an article form to display everything) but have had no success..

Any help or guidance would be appreciated.

Here is my current, rather simple, code block:

<div style=“height:320px;”><txp:image_display /></div>
<txp:image_info type=“caption” />
<txp:image_index wraptag=“div” break=”“ />

Last edited by RepoPrez (2011-10-27 14:35:48)

Offline

#2 2011-10-27 15:22:48

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: gallery issues

Hi RepoPrez

Try using the new tag txp:images that can help you build a gallery easily

a code like this should work

<div style=“height:320px;”><txp:images><txp:image />
<txp:image_info type="caption" />
</txp:images>
</div>

The link you give take to a list of images and txp:images_info need to know wich image to handle, putting it into an txp:images tag will solve the error.

For the old tag imag_display and image_index, never used them.

Cheers

Offline

#3 2011-10-27 17:45:39

RepoPrez
Member
Registered: 2008-03-01
Posts: 10

Re: gallery issues

That doesnt quite work for what I am tying to accomplish. But I do see the use of the <txp:images> tag and I think I used it to my advantage somewhat..

Here is what I have now..

<txp:images auto_detect="category" limit="1">
<txp:image_info type="caption" />
<div style="height:320px;"><txp:image_display /></div>
</txp:images>
<txp:image_index wraptag="div" break="" />

http://www.jonathanevega.com/gallery/?c=audrey

… still having issues where it will not show the caption for the image shown. Help, please! :\

(added bc. for better code display. -Els)

Last edited by els (2011-10-27 19:40:17)

Offline

#4 2011-11-09 10:54:19

mVincent
New Member
From: Philippines
Registered: 2011-11-07
Posts: 2

Re: gallery issues

error_image_context

i think you’re missing the ‘image context’ from how you generate your link to your gallery.
In your case, your <txp:images> tag is actually looking at an article context (or i may be wrong).

anyhow, perhaps you can try adding in your link ( or in case your generate your link – add an attribute type=“category” )

http://www.jonathanevega.com/gallery/?c=audrey&context=image

Offline

Board footer

Powered by FluxBB