CMS Development

piersg
Autorität

HubDB dynamic pages meta description not pulling from specified table column

lösung

Hi there,

 

I've set the meta description in the DB settings (as per https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb), however this is applying to the og:description and not the meta description, which is still displaying the description from the parent page.

 

The parent page: https://www.mews.com/products/marketplace

Dynamic page: https://www.mews.com/products/marketplace/atomize

 

HubDB settingsHubDB settingsOutput HTMLOutput HTML

0 Upvotes
1 Akzeptierte Lösung
JasminLin
Lösung
HubSpot Employee
HubSpot Employee

HubDB dynamic pages meta description not pulling from specified table column

lösung

Hey @piersg , I took a look at your pages and the reason your dynamic pages' meta description are showing the parent page's meta description is due to your template. The page template you are using includes a head.html partial template that contains this:

<meta name="description" content="{{ content.meta_description }}">

If you look at your dynamic page's Developer Info (click on HubSpot sprocket > Developer Info), you'll find that content.meta_description on the page contains the meta description of the parent page. But page_meta.meta_description will contain the meta description set by the HubDB table. 

 

So you should change the HubL in head.html template from content.meta_description to page_meta.meta_description. 

Lösung in ursprünglichem Beitrag anzeigen

3 Antworten
JasminLin
Lösung
HubSpot Employee
HubSpot Employee

HubDB dynamic pages meta description not pulling from specified table column

lösung

Hey @piersg , I took a look at your pages and the reason your dynamic pages' meta description are showing the parent page's meta description is due to your template. The page template you are using includes a head.html partial template that contains this:

<meta name="description" content="{{ content.meta_description }}">

If you look at your dynamic page's Developer Info (click on HubSpot sprocket > Developer Info), you'll find that content.meta_description on the page contains the meta description of the parent page. But page_meta.meta_description will contain the meta description set by the HubDB table. 

 

So you should change the HubL in head.html template from content.meta_description to page_meta.meta_description. 

piersg
Autorität

HubDB dynamic pages meta description not pulling from specified table column

lösung

Perfect, thanks @JasminLin 

0 Upvotes
Kevin-C
Trendsetter/-in | Partner
Trendsetter/-in | Partner

HubDB dynamic pages meta description not pulling from specified table column

lösung

I'm very interested in the outcome of this issue, and do appologize I cannot offer any help at this moment.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 Upvotes