Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-16 06:50:53

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

I need to create a (Business) Directory

Hi,

I need to create a (Business) Directory – Name – Address – Tel.No – E-mail – Website – Description …

Any pointers as to the most efficient way to do this would be appreciated.

I need to organise via Categories and also an A-Z listing. Texpattern seems an ideal way.

Will I have to create a page for every Category or is it better to use a long list of <txp :if statements on one page?

I expect to have around 150-200 Categories.

I don’t want to reinvent the wheel and if any one has any ideas on a logical and efficient way to start this project, it would be appreciated.

Thanks
Geoff


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#2 2008-04-16 07:55:51

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: I need to create a (Business) Directory

I need to create a (Business) Directory – Name – Address – Tel.No – E-mail – Website – Description …

Maybe try using custom fields and ob1_advanced_search.

I can’t think of an approach to sorting alphabetically just now. Not sure if that can be done at this point with normal txp:tags, a plugin, or a dab of php. Try in that order.

No need to reinvent these wheels.

I would use just one page for all categories. Use additional pages for things like a seperate design or completely unrelated content (about page, contact, etc…) that uses a different layout. You should be able to avoid a ‘long list’ of if statements with some smart txp:tagging or category plugins. Perhaps call different forms with if else statements from your directory page to help scale down and manage your blocks of code.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#3 2008-04-16 17:12:12

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: I need to create a (Business) Directory

The ‘core’ tag txp:article will already do a lot of things for you i.e. sort by ‘name’ if name=title of the entry.

The sophisticated <txp:article_custom /> can do some nifty things too by default.

A good way might be to have A-Z=sections, Branches=category1, Street=category2 and you are pretty much on the right track with TXP core features IMHO.

From the beginning I would use the microformats hCard and hReview in the article bodies.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#4 2008-04-17 16:23:50

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: I need to create a (Business) Directory

geoff777:

I would suggest looking at: glz_custom_fields

This will give you an extreme amount of flexability when using the custom fields.

progre55

Offline

#5 2008-04-17 17:08:43

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: I need to create a (Business) Directory

Well, the tip to use glz_custom_fields is good but I would always recommend not to use custom fields if you are creating the basic logic of a website (esp. for a beginner).

Custom fields will come very handy if you are more experienced and you really don’t find a way to present a solution with the core tags.

That’s the reason why I did not mention custom fields!

If you need more transparent information access I would recommend using keywords and the tru_tags plug-in. More explanation for my basic concept:

A-Z=sections

A is not B is not C so the content division by section is logical.

Main Branch=category1

Branch as category because categories can easily be expanded (plus breadcrumb hierarchy).

Street=category2

This is even easier because street1 is not street2 (see sections) but can easily be expanded (plus breadcrumb hierarchy). A category hierarchy allows to add ‘areas’ or ‘ZIP codes’ for better editing/organization.

Keywords

Keywords are great for all the ‘meta’ information like ‘areas’, ‘ZIP codes’, sub branches, synonyms, Nicknames etc.

Disadvantage: At the present Textpattern (4.0.6) or tru_tags does not allow the logical AND combination of keywords.

Search

That’s the big disadvantage with Textpattern. You don’t get an advanced search form with the Textpattern core. How can someone realize such an advanced search?

External Search

To get a more fuzzy and weighted search result I would recommend to use a Google search box instead of the precise full text core search function (One word or one phrase only!). Or use both forms parallel but explain the different behavior to your readers :) Of course this must be tested.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#6 2008-04-17 17:24:24

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: I need to create a (Business) Directory

Thank You,

Something to think about and investigate.

Your help is much appreciated

Geoff777


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#7 2008-04-17 17:30:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,449
Website GitHub

Re: I need to create a (Business) Directory

merz1 wrote:

How can someone realize such an advanced search?

Though I wouldn’t call it advanced per se there is a plugin that offers a less precise search that may help in this situation. With some tweaking it can give astoundingly creepy results. Of course it also offers some off-the-wall suggestions every now and again but that may be because it’s not really been tested by a great many people to date.

The advantage is you can tell it which parts of the article you wish the search terms to look (with some cleverness and a form, you may even be able to allow your visitors to choose which bits they search; I’ve not tried that yet). It currently won’t look in any glz_custom_fields but can easily be made to do so. Just yell.

smd_fuzzy_find is the fella.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2008-04-17 22:17:43

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: I need to create a (Business) Directory

Bloke Stef, I am sure that someone has written some ‘advanced’ multi field search forms to look for infos in specific database fields but as far as I know you need to define the forms, the markup, the PHP code and the database queries in raw code.

The fair minded answer above was aimed at Geoff777. I just don’t want to see a beginner construct a nice address directory solution and then standing naked in the wind when it comes to ‘address search’. It is not difficult but those searches are not covered by TXP core tags.

I would also love to see an easy way to construct db queries for such searches from within Textpattern.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB