Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-11-07 03:03:28

petrutz
New Member
Registered: 2013-11-07
Posts: 4

Structured data

Hello everybody,

I’m using TXP since 2005 and it was a joy.
Back into 2006 we developed a quite big site for a client using Textpattern, over time the client decided to move to Magento but we are now thinking about coming back to Textpattern.

The main problem I face to which I don’t see any straight forward solution is structured data.

Say you have two classes of objects that you want to display each with it’s own attribute list. Something like T-Shirts with size and color and dog food bags with the attributes brand and weight.

How would you go about implementing a special template for each class of products?

The quickest solution would of course be using the custom fields and some conditionals but this approach is really limited because if the list of attributes is anything bigger that two or three and if the list of classes is about 10 or 20, then editing a given article is a mess, as you’ll always have a field size and color even if you are editing an article that is referring to a dog food bag.

What I was thinking it could be a nicer solution would be some kind of article’s body parser and some textile or markup conventions that would allow storing and processing the contents as structured data.
Is this approach easily achievable?

How hard would it be to have different and configurable article types? Is this a planed feature for the near future?

Are there any other solutions to this problem that you can think about?

What I’m looking for is a functionality similar to http://processwire.com.

Thank you very much.
Petru

Last edited by petrutz (2013-11-07 03:08:40)

Offline

#2 2013-11-07 08:18:08

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: Structured data

There is an admin plug-in bot_write_tab_customize that allows you to configure the visibility and position of the Content > Write page depending on which section is selected in the drop down menu.

This enables you to only show relevant custom fields for a particular section and to place them in the central column, for example, say after the body field, where they are more visible to content editors.

Offline

#3 2013-11-07 09:05:57

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

Re: Structured data

Hi

Take a look at plugin yab_shop i am sure it will help you in your website.

Here is the original plugin that work with txp 4.4.1
For the recent textpattern (4.5.x) you must use this one from Bloke.

Cheers

Offline

#4 2013-11-07 09:13:52

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: Structured data

When I have needed more structured data than Txp can natively support, I have resorted to adding my own tables and then using smd_query to do the work of pulling the data out. In other words, if you can write a query in SQL then smd_query will do what you want to do.

Offline

#5 2013-11-07 09:33:29

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

Re: Structured data

Hello, and welcome back to Textpattern.

I would add two remarks:

petrutz wrote:

What I was thinking it could be a nicer solution would be some kind of article’s body parser and some textile or markup conventions that would allow storing and processing the contents as structured data. Is this approach easily achievable?

It depends on what you call acceptable “textile or markup conventions”. If XML or JSON format is ok for your clients, then it’s quite easy to implement, in the article body or custom fields or wherever. We’ve got few plugins (smd_xml or etc_query) for parsing. Edit: the drawback is the difficulty to search/filter articles by your custom attributes.

How hard would it be to have different and configurable article types? Is this a planed feature for the near future?

AFAIK, it’s planned for 4.6, but the release date is uncertain.

Last edited by etc (2013-11-07 10:09:35)

Offline

#6 2013-11-07 15:46:32

petrutz
New Member
Registered: 2013-11-07
Posts: 4

Re: Structured data

Thank you everybody for the great links you have provided!
I’m sold back into Textpattern now :)

Offline

#7 2013-11-09 06:11:16

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Structured data

adi_matrix may be an option to assist the editing of multiple custom fields.

Offline

Board footer

Powered by FluxBB