本文假设你已经了解views slideshow 6.x的用法,或者对views slideshow 7.x有一定的了解。
问题:
在views slideshow 7.x-3.0-alpha1中,设置分页导航有问题。以前在6.x版本中分页导航类型可以选择Numbered,也就是数字导航。但在这个版本里只可以选择fields,需要选择内容字段作为分页导航。如果要实现列表翻页效果,一页只显示一个node没问题,但如果一页显示多个node,那fields导航数会是node的总数,而不是页数。
解决:
其实views slideshow一直都是基于开源的jQuery Cycle,而jQuery Cycle内置有数字分页导航的功能,只要设置pager参数就可以。views slideshow支持高级设置功能,不过需要先安装json2库(设置页里有提示安装方法)。安装了json2后,在slideshow的设置页就会出现高级设置的选项。
Advanced Options选择pager, Advanced Option Value填写jQuery选择器表达式,然后在页面上添加对应的DIV (方法很多,例如在views的footer上添加)。
假设添加了<div id="pager"></div>,选择器表达式应该填#pager,然后点一下Update Advanced Option并保存整个views,分页导航就会生效。