Jump to content

Business Directory Website


aw.be
 Share

Recommended Posts

HI everyone.

I built a basic site in PW a few months back (and I was a beginner then) but haven't required it for any projects since - until possibly now. But I need to know if PW is the right choice.

I need to build a business directory website. Essentially, when one of the reps get a request for a business to be included somewhere in the directory, I want them to be able to easily insert it in within the proper category. I have no idea how to build the category structure, however.

In addition (because the reps might be challenged when it comes to using a CMS), is it possible for each to have a separate log-in to back-end of the site, and "insert a listing" so to speak?

If anyone has some input or if you've done something similar, let me know.

Thanks.

Aaron

Link to comment
Share on other sites

HI Aaron

Funilly enough, we have been talking about categories.

As you noted, processwire does not have a native category or tag system, and the reason is that it is easy to build one using pages and the page field.

This is incredibly rough:

Create a template without a file - call it category for neatness!

Dont add any fields to it.

Create a page using this template - call it Categories (for fun) and make it published and hidden

Now, create a couple of children to this new page with the same template - call them category 1 and 2. They should be published and visible.

Now, create a new Page field - call it Category. Once you have created and saved it, edit it and under details Select a single, and then in the input tab, select PageListSelect and change the Parent of selectable page to your Categories page

That field can now be added to articles and will save a category name with the page. You can then use that to filter results in your template files.

You can use the same system to create nested categories, tags or whatever. You also have the option to allow people to create new categories from the field.

That is very rough, sorry, but is a basic way to get you started.

As for permissions, I haven't done a lot with those yet, but you can create user groups and restrict them to various functions. 

I am sure some better answers will appear shortly!
 

Joss

  • Like 3
Link to comment
Share on other sites

Thanks Joss. I think I might be able to follow what you said there.

I'll have to wait to see if the project is a go and implement the above. I'll post back if I bump into anything, but I guess I'll have to figure out how the client wants the thing to look in the first place. 

Good to know it's doable though.

Aaron

Link to comment
Share on other sites

HI Aaron

I will be writing up a better tutorial later this week on this very subject, so look out for that. But there are also some other posts in the forums about this with some snippets to help.

Basically, this sort of thing is good to do in ProcessWire because you are not regimented by a particular structure - you can easily create your own. That helps when it comes to realising the clients needs; you don;t have to persuade them down a route they dont wish to go down. :)

Joss

Link to comment
Share on other sites

As you noted, processwire does not have a native category or tag system, and the reason is that it is easy to build one using pages and the page field.

ProcessWire is a native category system, whether by structure or relation. I think the distinction is that we don't call them "categories" or "tags". But "does not have" makes it sound like they aren't part of the plan. When in fact, it's one of the underlying purposes of the system. ProcessWire's grandfather (Dictator CMS) had a category system called "channels" and it took me awhile to realize it, but they were a complete waste of time... The literal channels/categories were immediately rendered useless once the Page reference type entered the scene. I continued using channels on the sites that had started with them, but this antiquated type of category system never felt right again. Today's ProcessWire not only has categories, it has them on steroids. :)

I need to build a business directory website. Essentially, when one of the reps get a request for a business to be included somewhere in the directory, I want them to be able to easily insert it in within the proper category. I have no idea how to build the category structure, however.

If each business only belongs in one category, and that will always be the case, then categories by structure is a good way to go. Meaning, your structure would be:

businesses
    web-design
        a1-web
        ryan-cramer-design
    accounting
        acme-financial
    architecture
        top-notch-houses
        dlux-office-design
    restaurants
        las-tortillas
        bread-and-cheese-house

If each business can be in multiple categories, then you'd want a structure like this:

businesses
    a1-web
    ryan-cramer-design
    acme-financial
    top-notch-houses
    dlux-office-design
    last-tortillas
    bread-and-cheese-house

business-types
    web-design
    accounting
    architecture
    restaurants

Then each "business" page would have a "Page" reference field called "business_type" where the editor can check one or more boxes. 

Each business would display their types like this:

<h2>Types</h2>
<ul><? 
foreach($page->business_types as $t) 
  echo "<li><a href='$t->url'>$t->title</a></li>"; 
?></ul>

Each business type would display the related business like this:

<h2><?=$page->title?> Businesses</h2>
<ul><? 
foreach($pages->find("business_type=$page") as $b) 
  echo "<li><a href='$b->url'>$b->title</a></li>";
?></ul>
  • Like 5
Link to comment
Share on other sites

ProcessWire is a native category system, whether by structure or relation

Yeah, good point - I was more thinking that is hasn't got one that is shown as a separate entity in the admin - which means you can relate things together in any which way you want, in addition to the page structure.  :)

Link to comment
Share on other sites

  • 4 weeks later...

HI everyone.

I built a basic site in PW a few months back (and I was a beginner then) but haven't required it for any projects since - until possibly now. But I need to know if PW is the right choice.

I need to build a business directory website. Essentially, when one of the reps get a request for a business to be included somewhere in the directory, I want them to be able to easily insert it in within the proper category. I have no idea how to build the category structure, however.

In addition (because the reps might be challenged when it comes to using a CMS), is it possible for each to have a separate log-in to back-end of the site, and "insert a listing" so to speak?

If anyone has some input or if you've done something similar, let me know.

Thanks.

Aaron

Hi,

I would like to share information that you...Just now i got one website..they are providing with business directory script. it is depand on your all features...check out Ezydir..

Link to comment
Share on other sites

Ryan - sorry, totally forgot I posted this. Thanks for the info you provided as that would have gotten me up and away.

But - the "client" turned out to be a total nut and wanted me to work for free - plus give him 40% of revenue from any referrals for sites that came through him from the directory businesses. Once I heard that, I packed up my notebook, laptop and told him I wasn't interested. Client horror story.

But again, thanks for being so active in helping people find solutions with Processwire.

Aaron

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...