我们希望能够拥有一个portlet来显示同一主题的文章列表,以下将要讨论一些与此相关的不同方法。
The following different approaches will be discussed in relation to a desire to have a portlet that shows a list of articles of some subject.
再次想象一下,如果用户是黄金客户组的成员,portlet处理列表只是为了显示某些文章。
Again imagine that the portlet doing the listing should only a show some articles if the user is member of the gold customer group.
对于IBCWeb站点,我们需要显示公告的列表和论坛中最近的文章。
For the IBC Web site, we needed to show a summary list of announcements and the most recent entries in the forum.
本系列的最后这一篇文章将介绍当用户浏览到列表结构末尾而应用程序实际上还需要显示一些内容时,应当如何执行操作。
This final series article looks at what you should do when the user reaches the end of the list structure and your application actually needs to display some content.
列表2显示了GNUMakefile,包括修改的构建和测试系统(请看下载,从而获取这篇文章所使用的源代码)。
Listing 2 shows the GNUMakefile that contains modified build and test systems (see Downloads to get the source code used in this article).
最近的文章—显示博客最近的文章的列表。
Recent posts - displays list of the blog's most recent posts.
在一个无序列表上显示所有的归档,按月显示文章的数目。
Displays all archives by month in an unordered list, with count of posts by month.
下面的例子显示了根据名称分类的类别链接,显示了每个类别的文章数目,并且从列表中删除了ID是10的类别。
The following example displays category links sorted by name, shows the number of posts for each category, and excludes the category with the ID of 10 from the list.
当你想要在文章列表开始之前显示搜寻结果计数标签或文章导览标签时使用。
Used when you want to show a search result count, or article navigation tags before the list of articles.
可能,对于大多数要用到多个循环的人来说,都是为了在同一个页面中显示一个(或多个)文章列表。
Perhaps the most common use of multiple loops is to show two (or more) lists of posts on one page.
你已经有了与类别有关的文章,而且开始向文章添加标签,你可能想要在每篇文章的下面显示类别和标签结合的一个列表。
If you have existing posts associated with categories, and have started adding tags to posts as well, you may want to show an integrated list of categories and tags beneath each post.
属于‘特色的’类别里的文章应该首先显示,紧跟着,第二个文章的列表(标准的)。
Posts in the 'featured' category should be shown first, followed by the second listing of posts (the standard).
'最近的文章' ' '—显示博客最近的文章的列表。
'recent posts' - displays list of the blog's most recent posts.
'最近的文章' ' '—显示博客最近的文章的列表。
'recent posts' - displays list of the blog's most recent posts.
应用推荐