Mới nhất

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

By phantuanduy - Friday, March 8, 2013 No Comments

Tạo bộ lọc bằng module views
Đầu tiên vào trang http://drupal.org/project/views tả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ọn YEs


 

 

Sau đó SAVE lại

 

 

 

 

Vào structure -> BLOCKs

kích hoạt block exposed form: loc-page

 

 

 

vào trang HOME xem kết quả

 

 

 

 

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

 

 


 

 

 

sau đó save lại

 

 

 

 

 

 Chúc các bạn thành công!
 st: Nhật Hoàng


Xem danh mục tất cả các bài hướng dẫn về Drupal tại đây.
                                                  

No Comment to " Tạo bộ lọc bằng module views "