WordPress有个插件(Random Articles Wordpress Plugin)可以实现随机文章区块。Drupal好像没有随机文章(Random Articles)模块,那么Drupal怎么实现随机文章区块呢? 其实很简单,用View就可以实现随机文章。只要在Sort Criteria里面选择添加 Global: Random排序条件即可。 下面就是随机排序设置的截图: 4 y# S- ~" |: t1 s1 G

Drupal Ramdon Articles 设置步骤: * l& h* O6 y/ u1 h/ b/ K" C
1.create a new view in administer » views » add tab. 在administer » views » add tab新建一个views
x1 |1 P0 z1 U/ @2.give it a name. I called mine "Random".
; w; w$ o& K7 ]4 M8 A7 Y Y命名,我用的名字是"Random".
' S U+ r: G- ?( G+ q; _, j& m
4 r" ^5 k! ?& T) I: H% }3.click the "Block" section heading to get its settings.
4 Y( d s; A" V9 r: ~* R点击 "Block"部分的标题,以获得其设置。
! E/ ~0 u3 u+ w' i3 q8 ^2 z5 b1 m5 n) b; j) f$ V4 [4 L( s
4.enable "Provide block"
+ T2 E- i& q, R启用"Provide block"
* \- H1 Q2 u2 |3 j2 B9 l% E
; t, K* N* b S5.choose a "View type". I went with "List View" so that I could choose which fields display in the block.
* ^5 [1 K$ e7 p; F; g选择一个“View type 视图类型” 。选的“List View 列表视图”,这样我可以选择在哪些领域显示块。: E- U8 J! Z$ F" P. h
1 ?% \' c% J3 A1 m+ t, d5 J
6.type in a title. This will be the title of the block.
7 F0 l+ ?2 f2 t/ j3 b& I键入标题。作为Block块的标题。
: b/ \2 d$ u4 r7 H1 b2 Z- h
- K0 _6 g h+ v7.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.! t, h0 [/ ?9 p1 p
在您想要显示的块节点上键入一个数字值。如果你愿意,你可以用1 (数字1) 。, S; q# n5 E$ y
& u: x/ P! h1 }* o5 X5 _$ F
# ~2 H! B& T/ p4 a2 c. u! O* [8.click the "Fields" section heading to get its settings.1 r$ Z# n' S& M) D5 {" t
单击“Fields字段”部分的标题,以获得其设置。
) ?4 \0 w! I+ w& q' N
# u' o/ w: K i: T& \1 ]5 I6 ?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.! ~! g( X1 H. a; ^
添加你想要的Fields领域。我只是选择“Node: Title节点:标题 ”因为我想只是链接到的节点,而不是节点的文本本身。你应该能够选择任何领域有报价在CCK的节点。
0 X( T! \9 [0 i, h- I! \- k' L5 H q" y* p/ y& ]7 b" P
10.click the "Filters" section heading to get its settings.3 D0 M* F& g j1 Z6 L7 f
点击“Filters过滤器”一节的标题,以获得其设置。
2 C% |, O( I0 x/ Y7 X1 Z
: q8 X- e6 R7 |4 n11.select "Node: Type" and click "Add Filter". p0 ?2 A1 U4 J- N
选择“Node:Type节点类型” ,然后点击“添加Filter过滤器”
$ E- h! U2 h9 ^) s" @# ]& y2 j8 z9 L
12.choose the CCK node type(s) you want to appear in the block.4 E" U1 D% z# F/ [9 k
选择了CCK节点类型type(S)你要出现在块。
& H4 ]1 M3 C$ u! b# B/ g' V c6 Y) [* k- {3 u
13.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.
1 j3 t$ T& h5 s% t, H. T+ d' c! L% j选择“Node:Published节点:发布” ,点击“添加过滤器Filter”。(我一直忘了这一个,但它是重要的,因为你可能不希望显示未发表的节点。
. Y' }# w, P1 g4 u% |
K- A" V1 f3 G) {4 d14.click the "Sort criteria" section heading to get its settings.
& s& i8 w$ I/ W* F% c" g; k点击“Sort criteria排序标准”部分的标题,以获得其设置。8 a/ F: `& S7 N4 b/ {. t
9 ^3 y, ?! v. p! a( q" u) l
15.select "Random" and click "Add criteria".& R @) D9 s+ z0 U! n
选择 "Random",点击 "Add criteria".
! f0 u1 w. P* b0 K5 l# t+ I9 U3 }+ O; ~5 f, h
16.click "Save"
8 v( G3 u5 M8 O. S; m, ^. g' ]点击保存
/ ~* u4 J6 l) E; h4 c: J/ _$ y8 I, v0 T4 [' S. m9 k( b; r6 e6 Z
17.click administer » blocks and enable the block you titled in step #6.
2 d6 l2 ]. u: X/ B( i/ D点击administer » blocks,并启用第6步设置标题的Block快。
) L1 U' E, D$ x6 `6 }+ h( S# {% @/ I8 @( K( R0 j) _
----------------------------------------------------------------------------------------------
- n n+ {1 e* ]: n& g! s- v- l! J) z7 O) Z& C9 {2 m- Q
DOOOOR国外设计论坛 www.doooor.com---Howfar翻译!转载请注明,谢谢!" n0 Q/ z; R$ X; u
. H2 V0 r( p0 H a
) b/ r' T; h. t9 q/ o
8 j# ?: R6 K- E h( ^% S# j" L/ r$ o- ~, a/ X
|