Hola! ¡Tenemos nuestra Comunidad en Español!

Get website Page with Hubl

SOLVE
Occasional Contributor

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.

 

Thank you so much in advance!

1 Accepted solution

Accepted Solutions
HubSpot Employee

Hey @mkthgrd

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 (https://designers.hubspot.com/docs/hubl/hubl-supported-variables), 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? 

11 Replies
Community Manager

Hey @FabioM,

 

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:

 

Blog Loop using specific post IDs

Blog pagination with loop 

 

Reply
0 Upvotes
Occasional Contributor

Hi, ank you for your answer.

I read the  threads you linked, but these are solution for listing blog post.

I need to do something similar with Website pages or Landing Pages without using a DB.

Reply
0 Upvotes
Occasional Contributor

I am in need of the same functionality, has there been any progress made in this request?

Reply
0 Upvotes
Community Manager

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. 

Reply
0 Upvotes
Occasional Contributor

Hi @roisinkirby, thank you for your answer! My first example is this page: https://www.thron.com/it/customers/case-histories 

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.

I hope my use case is clear!

Reply
0 Upvotes
New Contributor

Hi @FabioM@roisinkirby@jao28!

 

Any updates on this? I'm trying to do the exactly same thing...

 

I want to create a blog listing page with blog posts and landing pages directly within the loop.

 

Is it possible?

Reply
0 Upvotes
Community Manager

HI @mkthgrd - this isn't my area of expertise, but CC'ing some our experts to confirm: @Yoshi, @Jsum do you know if this is possible?

Reply
0 Upvotes
HubSpot Employee

Hey @mkthgrd

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 (https://designers.hubspot.com/docs/hubl/hubl-supported-variables), 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? 

New Contributor

Hi @Yoshi and thank you for your answer!

 

At the beginning, I could not use HubDB because it was not available in the portal we use...

 

But things are moving and we are going to subscribe to the HubSpot CMS.

 

How can I create a blog listing and insert a HubDB loop inside?

Do you have an example? A snippet?

 

Thanks!

Reply
0 Upvotes
Occasional Contributor

Hi Yoshi,

ok, that's pretty clear.

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.

Thank you

Reply
0 Upvotes
Highlighted
HubSpot Employee

Hey @FabioM,

At this time, the table needs to update manually and we do not have a way to update table whenever a page is created within HubSpot. 

 

@mkthgrd

HubDB can be used only on website/landing pages but not on blog pages. 

 

 

 

 

Reply
0 Upvotes