HubSpot Ideas

kcombs

Add content filtering into the Page module field

Would love the ability to add content filtering into the Page module field and increase the call limit for supporting functions such as content_by_id

Something akin to ACF's Relationship field

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.
Screen Shot 2020-09-01 at 11.25.58 AM.png

 

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."

 

Functions that support the Page module field (https://developers.hubspot.com/docs/cms/hubl/functions#content-by-id)  should have higher call limits as well. Ten calls per page really limits what you can do with them. Why not give these fuctions the same limit as blog_recent_posts (200)?

 

 

1 Reply
matt_scott
Top Contributor | Platinum Partner

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 %}