Hi there!
I would like to know if there’s a way to get a listing of website pages using a for loop with hubl and some filtering.
For example I would like to create a internal page for sales and marketing team highlighting all pages in a campaign.
Another example would a front-page for all the features of our software, filtering all URLs with /software/ in their canonical URL.
I found many ways to do so for blog pages, but I can’t really find a way for website or landing pages. I also thought about using APIs, but it would be quite complex to implement a backend solution.
There are several discussion threads on the Community r.e. this topic. I’d reccommend reviewing the solutions / insights below and commenting if you have any outstanding quesitons related to your topic:
Hello @FabioM apologies, I misread your question. Could you both please share links to your pages, links to the pages you want to list, and specific details about your goals / what you are trying to achieve.
Here we have some website pages with a common URL structure (../customers/case-histories/..) and we want a list of all that pages.
Right now I am using a js component and I am aware a HubDB table can be used to build that list, but if something similar to hubl blog listing markup would we available, I can get the same result without the need to update manually a table.
It’s not so easy to clearly focus what page data would be useful in this context: page url, canonical url, page author, campaings, page title, internal title ad meta are essential, I don’t know about other informations, such as template used or publishing status.
Currently, It seems not possible to print URL of all pages that are associated with a specific campaign.
However, we have a feature called campaign analytics under the reporting tool.
If the page is associated with a campaign, it should list all pages that are associated with a specific campaign.
Looking at here (HubL variables - HubSpot docs), we have a list of variables that can be used for pages, and it seems that we can pull URL info from that specific page, but not all URL that lives in HubSpot website tool.
May I know what is the reason why you do not want to use HubDB?
To use a HubDB to print pages with a loop I need to write the table first.
So my problem is: is there a way to create/update this table automatically without an external integration? For example: export a list of all pages with an API, parse the response and write all correspondant URLs in the table.
This is a viable way, but requires an external automation doing it.