The Page module field allows for the acquisition of any content’s ID (Page, Landing Page, or Blog). This is great, however, it could be improved by filtering what content appears in the module. This narrows what might appear, making it easier for clients to find the content the’yre trying to add.
Additionally, the documentation for the Page field does not mention Blog Posts despite the ability to select them with that field. I understand there are other functions for selecting blog posts, but sometimes you need "everything."
You can use the content by ids function to get up to 100, though it would be nice to be able to get more still and for the page field to have more options, it's also not the easiest to put the data into that function, here's what i've come up with (with a repeater group called pages and inside a URL field called page, I think I used the url field because it does give you the content type option)
{% set ids = [] %}
{% set groupContents = false %}
{% for item in module.pages %}
{% do ids.append(item.page.content_id) %}
{% endfor %}
{% if ids|first %}
{% set groupContents = content_by_ids( ids ) %}
{% endif %}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.