Skip Navigation

[Resolved] 在View的shortcode里面增加参数,让目前带分页效果的View变成没有分页

This thread is resolved. Here is a description of the problem and solution.

Problem:

Pass parameter to view's shortcode [wpv-view].

Solution:

You can follow our document to setup shortcode attribute and pass parameter to shortcode [wpv-view]

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by ben 3 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1716803

ben

hi Lou Yang,

我在这个页面 hidden link 用到一个View,一切工作正常。目前的代码是:[wpv-view name="module-list"]

我想在想重复利用这个View来生成一个没有分页效果的内容。我知道可以在View的shortcode里面加参数,但我找了一些方法后没有看到相应的解决方案。

所以我想问问我的这个需求时候可以通过在View的shortcode里面增加参数来实现,以及如何实现。

谢谢

#1716939

你好,

你说的“我想在想重复利用这个View来生成一个没有分页效果的内容”,这是什么意思?
能贴个链接,举个例子来看看吗?

Views 提供了Infinite scrolling功能,参考下面的截图:Infinite-scrolling.jpg

实现的效果类似于下面的页面:
hidden link

不知道是不是你想要实现的

#1716943

ben

谢谢回复。

可能我没有说清楚,我指的没有分页的效果不是ininite scrolling,我要的比那个简单多了。

如果你访问hidden link name="module-list"],你可以看到目前这个View是有带分页的。

我想要的效果是:我重新创建一个页面,让全部内容都显示在一个页面内(没有paganation)。我可以通过创建另外一个View来实现我想要的东西。但我的想法是:能不能使用现在这个现存这个View,然后在这个View的shortcode代码中价格参数或者类似的东西,来实现我的需求,这样我就不用再创建一个View了。

如果我的表述不清楚,请告诉我。

谢谢你

#1716961

感谢回复,Views 插件没有这个功能,参考我们的文档:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-view
没有你想要的取消分页功能。

目前只能另外创建一个view,获取所有的Posts,然后你可以按照我们的文档传递参数给[wpv-view]
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes

#1717181

ben

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.