HubDB dynamic pages meta description not pulling from specified table column

SOLVE
Highlighted
Occasional Contributor

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

 

Screenshot 2020-01-13 at 14.57.13.pngHubDB settingsScreenshot 2020-01-13 at 14.58.32.pngOutput HTML

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
HubSpot Moderator

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. 

3 Replies 3
Advisor

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

Reply
0 Upvotes
HubSpot Moderator

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. 

Occasional Contributor

Perfect, thanks @JasminLin 

Reply
0 Upvotes