We have many pages on multiple storefronts. In a custom module I’m designing, the merchant will be able to choose a page and the module will create a link to this page.
The website has so many pages. I would like to filter those pages per domain and language first. So the drop-down list will only show related pages.
I’ve been reflecting on the idea of filtering pages in the “Page” field type and wanted to provide some use cases and an example for a possible implementation. As the CEO of ByteYard, an online marketing and web design agency focused on HubSpot solutions, I believe this feature can greatly enhance the user experience and streamline content management processes.
Use Cases:
Targeted Content Display: By filtering pages based on specific criteria like domain, current language, or blog, users can ensure that the content displayed is relevant to a particular audience segment. For instance, when editing a French page, if filter.current_language is set to true, only French pages should be shown to select from, ensuring content relevance.
Streamlined Content Management: For agencies managing multiple blogs or domains under a single HubSpot account, this feature can simplify the content selection process. By filtering out irrelevant blogs or domains, content managers can quickly select the desired page without sifting through a long list.
Customized User Experience: Web designers can leverage this feature to create tailored user experiences. For example, a landing page promoting a specific blog post can automatically pull data from the relevant blog by setting the filter to the specific blog ID.
Example Implementation:
// Page field
{
"name": "page_field",
"label": "Page",
"help_text": "Pulls data from the selected page.",
"required": false,
"locked": false,
"placeholder": "Page to pull from",
"type": "page",
"default": null,
"filter": {
"current_language": true,
"domains": ["https://www.example.com", ...],
"host_template_types": ["BLOG_POST", "LANDING_PAGE", ...]
"blogs": ["987654321", ...]
}
}
This example demonstrates how the “Page” field type can be enhanced with a filter option, allowing users to specify criteria like domains, current language, and blogs. The idea of inheriting the language from the current page where the module is used is particularly powerful. The HubSpot documentation on custom module fields provides more insights into the potential of such implementations.
I believe that introducing this feature can significantly improve the HubSpot CMS’s flexibility and user-friendliness. I hope the HubSpot team considers this enhancement for future updates.
this is needed 100%. As an enterpise customer, our page count is high and this is becoming a growing problem. naming conventions work to some degree, but is not ideal. Some other places this would be useful.
CRM object field to filter available options based on a property value.
HubDB row field to filter available options based on a column value