|
WordPress有个插件(Random Articles Wordpress Plugin)可以实现随机文章区块。Drupal好像没有随机文章(Random Articles)模块,那么Drupal怎么实现随机文章区块呢? 其实很简单,用View就可以实现随机文章。只要在Sort Criteria里面选择添加 Global: Random排序条件即可。 下面就是随机排序设置的截图: 6 W6 k1 m+ h5 B% z/ h' C

Drupal Ramdon Articles 设置步骤: ( n1 H! G$ q4 o
1.create a new view in administer » views » add tab. 在administer » views » add tab新建一个views ' G2 I# f E1 L
2.give it a name. I called mine "Random".
1 L/ g* X }* G K; A3 g命名,我用的名字是"Random".
6 ?* G/ z; ~7 ~2 m4 H) W0 y- O
# @) _' }( s# c; {5 Y; V3.click the "Block" section heading to get its settings.
+ {7 F& c1 [$ R! x& @; O点击 "Block"部分的标题,以获得其设置。* g" p% r5 t, O, F5 d% k c0 w
! v. [) x6 e$ e% M4.enable "Provide block"( g5 z- W5 [9 j3 {7 H
启用"Provide block"7 i/ h) K* t$ z( J/ }# ^ R
; T0 q) n' B& f% B6 U5.choose a "View type". I went with "List View" so that I could choose which fields display in the block.
8 G2 i! [8 P9 h9 t' V* C7 k选择一个“View type 视图类型” 。选的“List View 列表视图”,这样我可以选择在哪些领域显示块。6 `: y5 C# i" n4 q# X2 X
2 o- Q5 y9 G r
6.type in a title. This will be the title of the block. L! x0 M; y- P( W( y4 J# h
键入标题。作为Block块的标题。
7 _2 ?1 \6 ?! `; g
" C c' c% G+ s5 c3 \- t5 [7.type in a number for the amount of nodes you want to display in the block. You can use 1 (number one) if you like." c. p+ H- v( r9 |/ O
在您想要显示的块节点上键入一个数字值。如果你愿意,你可以用1 (数字1) 。
- k" O2 G5 t7 ^2 H: K. i6 V7 L/ U- a8 V [2 i
) S9 g7 u d/ A6 _ G8.click the "Fields" section heading to get its settings.
& h* t: c2 C r: M8 w& c- U, W( A单击“Fields字段”部分的标题,以获得其设置。
3 F4 n; u9 Y4 D4 c8 d% N I$ W' z U: U/ C" d% E9 |
9.add the fields you want. I chose just "Node: Title" since I wanted just links to the nodes, not the node text themselves. You should be able to choose whichever field has the quote in your CCK node.
8 Q# N( Q, Y8 @$ f添加你想要的Fields领域。我只是选择“Node: Title节点:标题 ”因为我想只是链接到的节点,而不是节点的文本本身。你应该能够选择任何领域有报价在CCK的节点。
* T. [5 \1 ? X$ Q3 k0 ]7 E" w% s
9 e& q# v- K: g- @$ Y" `% j10.click the "Filters" section heading to get its settings.9 ~4 \6 r$ H2 e( ^# S9 ~4 ?) z
点击“Filters过滤器”一节的标题,以获得其设置。2 H" {6 R9 H8 s' a" n
| V2 E1 a. z7 d11.select "Node: Type" and click "Add Filter"
) K: @1 F# w& J; s1 S/ `选择“Node:Type节点类型” ,然后点击“添加Filter过滤器”, X* X8 O, a' u7 a
( I1 W# h" K. K ?12.choose the CCK node type(s) you want to appear in the block.9 V/ {# t; n, J+ P1 R5 g& Z
选择了CCK节点类型type(S)你要出现在块。. l g. Q; O+ ~1 L ^, y6 {" T
: a+ U8 l- R: J/ F, |; K' m+ t13.select "Node: Published" and click "Add Filter". (I keep forgetting this one, but it's important, since you probably don't want to display unpublished nodes.
7 U' v% C0 @# z8 G- n- ]2 S; K7 P选择“Node:Published节点:发布” ,点击“添加过滤器Filter”。(我一直忘了这一个,但它是重要的,因为你可能不希望显示未发表的节点。3 p M+ g7 `* t( a, Y
E& j! c$ s4 s7 r; f
14.click the "Sort criteria" section heading to get its settings.( d+ c. m1 c2 C( [8 H5 I0 N6 V
点击“Sort criteria排序标准”部分的标题,以获得其设置。
5 ~( L. l4 v+ V* b' K2 W/ h
' U" V: U% U! Z& z7 r15.select "Random" and click "Add criteria".- ~8 \! w* u1 {0 `! \: j
选择 "Random",点击 "Add criteria".
* L( S% ?' Z+ v
. l+ }7 J- G' V G& S2 a: ~1 D7 t% K16.click "Save"- T' [0 N6 E' d! A) m3 B
点击保存: O- d9 v' t T3 E! l
- P6 J* [3 [6 [6 i# s" _0 g% I
17.click administer » blocks and enable the block you titled in step #6.! T5 B) U% G! r9 X0 s" X
点击administer » blocks,并启用第6步设置标题的Block快。9 D7 m& j! y2 F8 ?' ]5 M
6 x+ x7 ?. s* r----------------------------------------------------------------------------------------------6 g; P1 j+ z6 j5 [
5 N) W/ K/ I+ F2 l8 M! k4 ^
DOOOOR国外设计论坛 www.doooor.com---Howfar翻译!转载请注明,谢谢!" a% O+ ~8 R* R' b% P0 w1 U8 ]
: o! u/ q1 ?! Z! T) w5 w$ K
4 [9 U7 K' P b
) S( i7 a, I% [+ o! j, T, E
2 i# l5 `: w; L6 I& I
|