Drupal7模組介紹-Views-part4
* Drupal版本:7.x
* 介紹模組:Views
* 模組版本:7.X-3.3
* 相依模組:Chaos tool suite(Ctools)
* 官方討論區:http://drupal.org/project/issues/views?categories=All
分享主題:Drupal7模組介紹-Views-part4
Goals:
1. Views的排序功能
前言:
有在玩drupal的人應該都知道,drupal已經是全世界都在使用的一個open source的平台,能夠幫助使用者快速開發出一個全新的網站,不僅安全性好,而且彈性也是不在話下。其中一個很重要的模組就是views。讓drupal能夠很有彈性的處理所有的資料,文案,並且整合到網站之中,學會views以後,基本上就可以建構出像樣的網站了,在這邊分享從我的角度,來看views這個模組。
Sort Criteria
通過view頁面的sort criteria,可以明確的排出資料的先後順序。

以下新增一個sort criteria的方法,點選add,即可以進入以下的頁面。

在這裡我們想要新增一個排序為搜尋次觸最多的文章,排序在前面,方法如下

到這裡已經有了兩個不同的sort criteria,但是究竟要先執行哪一個sort ceiteria呢?在drupal裡面,提供了排序的功能,排序在前面的先執行,因此,我們可以把比較重要的sorting功能擺在前面,直接以拉動"十字"的方式即可以更改!

Done! 完成了Sort criteria的功能!