I need a way to control the number of items being displayed while using the Insert View module. Obviously one could make a new display for each iteration, but I would rather avoid that.

This appears to have been part of the module years ago (version 5, maybe?), but has been lost in favor of using arguments in general. And perhaps there is a way of doing this via arguments, but I haven't found it. Since this module hasn't been updated since 2012, I figure there isn't much hope for support, so I'm writing a patch instead.

From the updated tips page:

To display a specified number of items, set one of the args as "limit:N" where N is the number of items to be displayed.
Setting a limit as an argument will override any limit set in your view. Use "limit:0" to display all items.

Examples:
[view:my_view=my_display=arg1/limit:3]
[view:my_view==limit:0]

Comments

mxwright created an issue. See original summary.

mxwright’s picture

Status: Active » Needs review
StatusFileSize
new2.18 KB

Here is the patch, hopefully this helps others.

mxwright’s picture

StatusFileSize
new2.18 KB

New patch, cleaned up slightly.

igor mashevskyi’s picture

Status: Needs review » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.

Everyone can apply the patch above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.