Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-15 01:58:45

georgeM
Member
From: Toronto, Canada
Registered: 2006-02-27
Posts: 43
Website

"how do I..." Extract and display a TXP:Image's _alt_ element in a <p>

Hello all,

Long time user of TXP however I’m not very active on the forums because I never usually have any problems. The story is a little different this time, as I am just about to create a product listing on a page, but I need to know the best way to accomplish this. I have some ideas, but basically I want to use/display the info associated to the TXP images for my site. More specifically, I want to extract the ALT or NAME field that is associated to this certain image to a <p>/<span> tag, and display it AND the caption (also in a <p>/<span> tag below the image:

[ IMAGE via img tag ]

[ NAME/ALT in p/span tag ]

[ Caption in p/span tag ]

I want to use glx_gallery to create the repeating function to display images (no thumbs/links needed) on the page via a <DL> tag (or even left-floated divs), and separate those image listings by X categories per page. The structuring of my product listing has a CATEGORY\SUBCAT\ID structure, so since I can only use one category in TXP, I will need to be able to display multiple categories on one page.

I just wanted to hear some suggestions or be pointed in the best direction on how to tackle this (i.e. plugins, basic methods, etc.).

If I’ve not explained this too well, please just ask me for clarification and I will do my best to re-iterate.

Thanks in advance TXP scene!

Offline

#2 2007-05-15 05:50:42

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: "how do I..." Extract and display a TXP:Image's _alt_ element in a <p>

upm_image allows you to build a form displaying every image property within your own markup.

Offline

#3 2007-05-15 19:11:50

georgeM
Member
From: Toronto, Canada
Registered: 2006-02-27
Posts: 43
Website

Re: "how do I..." Extract and display a TXP:Image's _alt_ element in a <p>

Hi wet,

Thanks so much for your swift reply. I know that it would seem like I’m an idiot, but really, that is not the case ;) I came across Mary’s upm_image plugin, however I did not see any documentation on the forum/her site/TXP.org so I wasn’t aware that it would offer me those capabilities. I haven’t quite setup this TXP install that I was planning, but I was able to install upm_image into another TXP site, and once I did that I saw all of the documentation listed under the Help section for the plugin.

Thanks again for the quick help!

-G

Offline

#4 2007-05-15 19:14:36

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: "how do I..." Extract and display a TXP:Image's _alt_ element in a <p>

You’re welcome!

Offline

Board footer

Powered by FluxBB