CMS Development

SWilson5
メンバー

Printing Values from HubDB "Multi-Select" column into Schema issue

解決

Hi All, 

 

I have issue printing values from a HubDB multi-select column into Schema Rich results. I want to display just the value that has been selected in the admin area. In this example, its Employment Type, and there are currently 3 options to select in the DB.

 

This is the snippet I'm using in the schema script

"employmentType" : "{{dynamic_page_hubdb_row.job_type}}",

 

This is what is shown in the Rich Results Test.

"employmentType" : "{id=3, name='Permanent', order=0, label='Permanent'}",

 

Any help would be greatly appreciated.

 

TIA, Simon

 

 

 

1件の承認済みベストアンサー
BarryGrennan
解決策
トップ投稿者

Printing Values from HubDB "Multi-Select" column into Schema issue

解決

I haven't tested but I imagine 

{{dynamic_page_hubdb_row.job_type.name}}

or 

{{dynamic_page_hubdb_row.job_type|attr("name")}}

 

will return what you're looking for.

 


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

元の投稿で解決策を見る

3件の返信
BarryGrennan
解決策
トップ投稿者

Printing Values from HubDB "Multi-Select" column into Schema issue

解決

I haven't tested but I imagine 

{{dynamic_page_hubdb_row.job_type.name}}

or 

{{dynamic_page_hubdb_row.job_type|attr("name")}}

 

will return what you're looking for.

 


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

SWilson5
メンバー

Printing Values from HubDB "Multi-Select" column into Schema issue

解決

Great, that worked perfectly. Thanks!

0 いいね!
BarryGrennan
トップ投稿者

Printing Values from HubDB "Multi-Select" column into Schema issue

解決

@SWilson5 great!

 

I'd appreciate it greatly if you marked my answer as the solution.

 

Many thanks!

 


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

0 いいね!