开发者

Show the sequence number of an article in Drupal

i have used views created an article's title page list of the content type story. now,i want to add the sequence number of the article before the article's title .eg: if i have 200 articles. it maybe 1 the first article title ,2 the second article title ...198 the 198th article title,199 the 199th article title ,200 the 200th article title. how to get th开发者_如何学编程is. thank you.


in views, you can add a field: Global -> view result counter This field gives you a numeric value which indicates the position of the view result row.

so after adding a title field and the counter field,you get for example

-Title: blablabla

View result counter: 1

-Title: blablabla

View result counter: 2

-Title: blablabla

View result counter: 3

...

you can ofcourse change the label or dismiss it completely


You can format your view as a numbered list. Under "Basic settings" set "Style" to "HTML List". In the style options, choose "Ordered list".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜