Hướng dẫn xây dựng Business Directory với Drupal 7

Hướng dẫn xây dựng Business Directory với Drupal 7

Over the last couple of weeks, several different OSTraining members have asked me about creating a directory in Drupal.

I'm going to recommend a 4-step process for creating a basic directory.

Using default Drupal, plus the Display Suite and the Search API modules, we can create almost any type of directory.

Step 1: Create the Content type

First we need to set up our content type for the directory.

In this example, I'm going to build a business directory.

I'm going to create one content type for all our businesses. However, if the different items in your directory require radically different fields, you might consider creating multiple content types.

Hướng dẫn xây dựng Business Directory với Drupal 7

The image below is an example of the fields added to this content type:

media_1403021295428.png

The final field, "Type of Business" is a taxonomy. I've set this up as a Taxonomy to give me maximum flexibility in the future:

media_1403020812525.png

If you're taking submissions from the public, read our article "Clean Up the Drupal Content Form" which shows you how to make it easier for new Drupal users.

Step 2. Import Data

You will need to get some data into your site so that you can build the directory. You have at least three options here:

  1. Manually enter the business data
  2. Use the Devel module to generate dummy data
  3. Import data from a CSV file using the Feeds module

In this example, I used the Devel module to create some "Lore Ipsum Dolor" businesses:

media_1403021328644.png

Step 3. Improve the Directory Pages

Once we have content loaded into our site, we can browse and see our directory starting to take shape.

However, by default, all of the individual pages will look fairly plain. For example, here is the page listing all the bakers in our directory:

media_1403021493870.png

One way to improve the display of these pages is with the Display Suite module. You can watch our full class on Display Suite by clicking here.

With Display Suite, you can control the layout of the page seen above by controlling the Teaser format.

media_1403021569709.png

In the example below, I used Display Suite to change the layout to a 3-column design:

media_1403021792667.png

Step 4. Filters with FacetAPI

One final step towards creating a good directory is adding powerful search features.

We recommend using the Search API and Facet API modules. Click here to see our full class on creating powerful search with these modules.

Here's an image from Wunderkraut of a faceted search created with the FacetAPI module:

media_1403025998761.png

And here's a video from our Search class illustrating how to use the Facet API module:

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Samsung Conquer 4G Review

Samsung Conquer 4G Review

Though to be a budget 4G devices, the Samsung Conquer 4G is very elegant and stylish. I was surprised at how well put together this phone is. The manufacturers seemed to have put a lot of attention to detail when making this gadget.

Hướng dẫn tạo Static Copy of a Website Drupal

Hướng dẫn tạo Static Copy of a Website Drupal

The modern Web is a dynamic place. However, sometimes it's necessary (or desirable) to remove the dynamic functionality of a website, while preserving its static content.

 
5,3 triệu máy Mac được bán ra vào Quý IV

5,3 triệu máy Mac được bán ra vào Quý IV

Doanh số của Apple có vẻ bị giảm, tuy nhiên trong quý này nó bắt đầu tăng trở lại. Theo báo cáo phân tích của Gene Munster thì đến cuối tháng 12 năm nay, doanh số bán ra của Apple có thể đạt tới 5.3 triệu máy.

Công ty diệt chuột T&C

 

Diet con trung