Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-04-24 17:37:13

lister
Member
Registered: 2008-02-13
Posts: 76

Tonic Gallery and Textpattern

Hi, I am in the process of setting up my portfolio. I am looking at using Tonic gallery. The gallery uses xml to populate the image, thumb and content as well as categories for navigation. So a pretty simple structure. But as I’m going to give textpattern a try I would like to publish a thumb, the main image and description through a post to populate the xml, is this possible?

the thing is Im not sure where to start? How do I get Textpattern to find the file portfolio.xml and then post just the Thumb, Main Image and description. Can anyone help?

<portfolio>
	<categories>
		<category id="graphic">Graphic Design</category>
		<category id="web">Web Design</category>
		<category id="photo">Photography</category>
	</categories>

	<items>
		<item>
			<thumbnail>images/Thumb001.jpg</thumbnail>
			<preview>images/MasterImg001.jpg</preview>
			<category>graphic,web,photo</category>
			<description>Description goes here</description>
		</item>
	</items>
</portfolio>

Last edited by lister (2011-04-24 17:41:17)

Offline

#2 2011-04-25 13:11:44

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Tonic Gallery and Textpattern

It isn’t so much Textpattern finding portfolio.xml as generating the proper structure. I am thinking along these lines.

<?xml version="1.0" encoding="UTF-8"?> 
<portfolio> 

	<categories> 

<txp:category_list wraptag="" break="" >
		<category id="<txp:category />"><txp:category title="1" /></category> 
</txp:category_list>

	</categories> 

	<items> 

<txp:article_custom section="article">
			<thumbnail><txp:article_image thumbnail="1" /></thumbnail> 
			<preview><txp:article_image /></preview> 
			<category><txp:category1 /></category> 
			<description><txp:body /></description>
</txp:article>


	</items> 
</portfolio>

Offline

#3 2011-04-25 18:16:19

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: Tonic Gallery and Textpattern

Hello Lister,

What Michael says, plus have a look at this TXP Tip that deals with incorporating an XML file into TXP to populate a gallery. It’s not exactly what you want but does provide a good example of a means of achieving what you want. You can use aks_header instead of mg_header, the former is based on the latter but offers more useful features.

Offline

#4 2011-04-25 21:21:20

lister
Member
Registered: 2008-02-13
Posts: 76

Re: Tonic Gallery and Textpattern

Thanks guys, i’ll have a look into this a little more closely.

Offline

#5 2011-04-25 23:10:16

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: Tonic Gallery and Textpattern

just as a sidenote: you can do most everything that tonic gallery does using txp and a couple of freely available jquery plugins that tonic gallery has refactored into its code such as jquery cycle (for the “swipe”), jquery easing (for the “swipe” special effects) and prettyphoto (for the lightbox). One advantage is that google gets to see proper source code (with tonic gallery, the source is generated after page load).


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB