Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-03-15 14:11:02

tom1
Member
Registered: 2009-03-20
Posts: 36

simple way to include table within an article

Hello All!
I have a project involving a website for real estate company. They need to include a table with specific info about the properties (like number of bathrooms/bedrooms, plot size, have garage or not etc), and users should be able to sort out articles by these fields. Ofcourse, fields should also be showed within article.

I thought about making own write tab for properties, but since i have never had chance to get into making own txp plugins, i thought better to ask you guys first.

So, anybody have ideas what would be the best way to accomplish this? any help strongly appericated!

Offline

#2 2011-03-15 14:54:14

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

Re: simple way to include table within an article

Hi Tom

I would try using custom_fields which can also be sorted with article custom


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 2011-03-15 14:59:24

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

Re: simple way to include table within an article

And for tabular data there is aks_table

Cheers

Offline

#4 2011-03-15 15:24:11

tom1
Member
Registered: 2009-03-20
Posts: 36

Re: simple way to include table within an article

Colak, i know i can sort articles with custom fields, but can i acutally print custom fields aswell with the article?

Offline

#5 2011-03-15 15:35:54

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: simple way to include table within an article

Does this help?

Displaying custom fields

There are also several speciality plugins that work with outputting custom field content (aam_split_custom_field, sed_pcf, esq_glzcfvallist for example)

Last edited by maverick (2011-03-15 15:38:06)

Offline

#6 2011-03-15 15:37:38

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

Re: simple way to include table within an article

Hi Tom

Yes you can. within an article context you can use

<txp:if_custom_field name="roomsnumber">
<txp:custom_field name="roomsnumber" />
</txp:if_custom_field>

or check out Mike’s answer above using plugins:)

Last edited by colak (2011-03-15 15:38:40)


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

Offline

Board footer

Powered by FluxBB