CMS Development

piersg
キーアドバイザー

HubDB dynamic pages meta description not pulling from specified table column

解決

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 いいね!
1件の承認済みベストアンサー
JasminLin
解決策
HubSpot Employee
HubSpot Employee

HubDB dynamic pages meta description not pulling from specified table column

解決

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件の返信
JasminLin
解決策
HubSpot Employee
HubSpot Employee

HubDB dynamic pages meta description not pulling from specified table column

解決

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
キーアドバイザー

HubDB dynamic pages meta description not pulling from specified table column

解決

Perfect, thanks @JasminLin 

0 いいね!
Kevin-C
名誉エキスパート | Solutions Partner
名誉エキスパート | Solutions Partner

HubDB dynamic pages meta description not pulling from specified table column

解決

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 いいね!