Tạo bộ lọc bằng module views

Tạo bộ lọc bằng cách sử dụng Views trong Drupal 7
Đầu tiên vào trang http://drupal.org/project/viewstải gói module views.
Vào http://drupal.org/project/ctoolsđể tải thêm module Ctools.
Giải nén 2 module vào thư mục sites/all/modules/
Vào Modules enable các module trên
 
 
 
Vào structure -> views
 
 
 
 
Sau đó, chọn Add new views
 
 
 
 
 
Sau đó điền vào
 
 
 
Rồi chọn continue & edit
Tại dislay page, ở mục Page details. Tại mục FILTER CRITERIA, chọn add
 
 
 
 
Tại mục Filter chọn Content. Sau đó chọn mục Content: Has taxonomy term. Rồi nhấn Apply
 
 
 
Sau đó chọn vocabulary của mình. Tại mục selection type chọn Dropdown. Rồi nhấn apply
 
 
 
Sau đó,
Tích chọn Expose this filter to visitors, to allow them to change it=> tùy chọn người dùng
Đặt tên vào ô label
Tại muc operator chon is one of
Apply
 
 
 
Ta được
 
 
 
 
 
Tiếp tục
Tại mục Page details chọn advanced

Tại EXPOSED FORM-> chọn EXPOSED FORM in blocks

 

 

 

 

 

ChọnYEs

 

 

 

 

Sau đó SAVElại

 

 

 

 

 

Vàostructure -> BLOCKs

kích hoạtblock exposed form: loc-page

 

 

 

 

vào trangHOMExem kết quả

 

 

 

 

 

Để bỏ Buttonhoặc đổi tên ta vào

 

 

 

 

 

 

 

 

 

sau đó savelại

 

 

 

 

 Chúc các bạn thành công!

Web hosting by Somee.com