Custom code: Add field from Multi Reference

Hello guys!

I have a website where the blog posts sometimes have multiple authors, so I created a component for that and integrated in the blog.

One problem I’m having is, I’m configuring the Schema for SEO and I cannot choose the multi reference for the authors. Is there a way to turn it around?


No, you could probably use Microdata instead of JSON-LD.

That’s a good idea, but I’m not much familiar with microdata. So, there’s no way to ‘add field’ from a multi reference, right?

You need to link a collection list directly to the multi-reference field, and then you can emit its contents as records within the collection list. Useful with Microdata. Not useful with JSON-LD.

This is a painful omission.

So for now is the best/easiest way to duplicate the multi-reference as a single author field and use that?

Since everyone is using it, I really wish Webflow would just support JSON-LD Schema…

“Best” depends on your goals. IMO there are three “easiest” ways;

  1. Use Microdata. It solves a lot of CMS->JSON-LD issues, including the generation or arrays, and the HTML encoding of inserted field data.

or:

  1. Generate the exact static JSON-LD you want, and drop it inside of an embed element in side of a CMS rich text field. Bind that to a rich text element on your page. You’ll get full JSON-LD control that way with no encoding issues- but 100% manual generation.

or;

  1. CMS data → script-generated JSON-LD. Takes some setup and testing, but this is the approach preferred by many, because it trades dev hours for a lower client-admin effort.