WordPress有个插件(Random Articles Wordpress Plugin)可以实现随机文章区块。Drupal好像没有随机文章(Random Articles)模块,那么Drupal怎么实现随机文章区块呢? 其实很简单,用View就可以实现随机文章。只要在Sort Criteria里面选择添加 Global: Random排序条件即可。 下面就是随机排序设置的截图:
H) \9 I/ G0 M. Z
Drupal Ramdon Articles 设置步骤:
0 W' O/ U- V6 L! c. _. ~; E# \1.create a new view in administer » views » add tab. 在administer » views » add tab新建一个views 6 d6 W+ u2 m6 q) T
2.give it a name. I called mine "Random".# P% ?! Y1 g, P2 t7 \( E0 {/ `$ G3 C
命名,我用的名字是"Random".
8 i0 b: A- I8 X% a H% }9 a
8 i3 O1 c4 [6 w' S. ~3.click the "Block" section heading to get its settings.
3 v& Z2 o/ C& {点击 "Block"部分的标题,以获得其设置。, L$ w; w# B* O$ v, v4 u
) g! o$ O C% [/ Y& p" K6 O* X
4.enable "Provide block"
; o: M5 V( }0 q2 V& a启用"Provide block"
2 Q7 t8 M" M: t! r2 K
4 K( q" a! q3 k# A) e5.choose a "View type". I went with "List View" so that I could choose which fields display in the block.
) N6 o$ f9 X9 B& H选择一个“View type 视图类型” 。选的“List View 列表视图”,这样我可以选择在哪些领域显示块。( I7 e1 G* M1 l: J% e$ ]2 {
: a' x; L9 c* B U5 g# W. z+ l
6.type in a title. This will be the title of the block., l& L, B2 s: H$ B
键入标题。作为Block块的标题。
+ e% R$ K, ]4 l6 k' v% Q( w% H4 u# \7 i$ v* I: ~
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.7 s' l/ u7 z) Z7 E4 ~4 v
在您想要显示的块节点上键入一个数字值。如果你愿意,你可以用1 (数字1) 。7 a" F7 S5 |9 p3 [
6 K( U/ W% _7 x2 [, w4 i
- ^* I/ H1 N6 y7 g7 T. r F6 H( S% l8.click the "Fields" section heading to get its settings.7 r! X; \ n; z) u1 T
单击“Fields字段”部分的标题,以获得其设置。
8 ^# Y. M6 ` v' I; u; h3 O
! H$ f) N. T4 w% Q9.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.
" S- y. g3 o& ^3 _! O添加你想要的Fields领域。我只是选择“Node: Title节点:标题 ”因为我想只是链接到的节点,而不是节点的文本本身。你应该能够选择任何领域有报价在CCK的节点。
! l# ^' A+ |* Q. P8 {) @( j( d" ] D9 x' O. ~6 d2 `; J( w
10.click the "Filters" section heading to get its settings.
* J E: \! A( Q8 W7 K( u% i点击“Filters过滤器”一节的标题,以获得其设置。3 r$ P& M0 p# S2 \
3 ?( v) M) ~- V11.select "Node: Type" and click "Add Filter"
: h( w" a# {% M" v4 R" d8 E9 {, }选择“Node:Type节点类型” ,然后点击“添加Filter过滤器”% U! Q w" ?* F! ]+ _
5 L0 ]) k' Q5 M; P, n3 x12.choose the CCK node type(s) you want to appear in the block.
3 D0 n4 X v9 v: |7 n选择了CCK节点类型type(S)你要出现在块。
' o# z6 d9 c5 F7 k3 C( O I+ p q. {- ]: R% N2 z
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.- ~- r) t- {% t: w
选择“Node:Published节点:发布” ,点击“添加过滤器Filter”。(我一直忘了这一个,但它是重要的,因为你可能不希望显示未发表的节点。7 z$ E: g b* L# F' p9 o
; H4 g4 `6 Y' j14.click the "Sort criteria" section heading to get its settings.' A$ @! r. z: u
点击“Sort criteria排序标准”部分的标题,以获得其设置。+ t$ r5 @& f3 e, B
- y; F1 J% S$ A$ _5 p
15.select "Random" and click "Add criteria".
* c# L- z K( b8 Q8 F选择 "Random",点击 "Add criteria".
) x& m! Q2 g& e& o! {8 \+ r2 S) L
16.click "Save"
$ e) U2 R% d4 K5 S- l9 ^& z点击保存
4 I( ~* X- l8 u, F' x: U% D% y q6 U6 B& _8 M. B& f1 l. ]( K
17.click administer » blocks and enable the block you titled in step #6.
2 q& D8 }6 W) I" r2 i点击administer » blocks,并启用第6步设置标题的Block快。: o& d/ v6 }4 a T4 z/ M. m( ^ x2 ~
3 N, I" y7 t( ~# k+ E- L----------------------------------------------------------------------------------------------/ b# ], k$ x. k9 i; N j
- w- m' d9 r, A5 D. RDOOOOR国外设计论坛 www.doooor.com---Howfar翻译!转载请注明,谢谢!+ _( r0 W# V7 b
9 a6 L3 Y5 G( R1 |) v% v, u* M
4 ]4 c0 O$ v7 X( |% q+ J+ j! F8 E
# | W, _ k# E8 H, U5 S: S: [8 o7 J, O3 I: G. | ?
|