Streaming live at 10am (PST)

Any known workarounds for nesting collections? Need to show tags in cards


#1

I just ran into the limitation for nesting dynamic lists inside each other. This is killing me!

My client needs a landing page with a dynamic list of project cards. In each card, I need to show associated tags for the project (which is another collection, connected to projects with a multi-reference field).

Essentially this is what I need to accomplish:

Are there any known workarounds to do this?


#2

Hi @helmsmith,
Yes, this is a pain. According to this page it is not possible at the moment:

At the moment, you can show multi-reference field values only on a Collection page, and not within a Collection list. Support for nested Collection lists is planned. Vote for and subscribe to status updates of this feature request.
https://university.webflow.com/article/multi-reference-field

I’m wondering if you can solve this by using custom coding (jQuery), adding invisible collection list with the tags and somehow make the relation, but I doubt that this approach will succeed.

You will probably end up adding the tags in a separate text field as well, besides the multi-reference field. Maybe you can automate this process with Zapier, but I’m not sure if you can trigger a Webflow event into another Webflow event (when project item = published, update the extra tag text field with multi-reference tag input)…

Sorry for my thinking out load method as a reply. I’m curious though how this can be solved.


#3

How many tags do you have for each project? If its many My work around this ots not a good solution


#4

each project could have up to 5-7 tags potentially, though i’d be glad to limit it to 3 or so on the landing page if that helps with the workaround


#5

The you have to create 3 Fields using referense not multi reference. Then the data can be displayed. Multi reference only works for filtering


#6

The primitive workaround I use is:

  1. Create a rich text field in the collection item editing panel.
  2. Hand type the same items that are in the multi-reference field, and then link each of them to the same collection items in the multi-reference field.
  3. In the page displaying the list of collection items, insert a rich text field which pulls the text from #2 above.

There must be some better way, but I am not a programmer and I haven’t found a solution on the forum yet.

Update: another option would be to create a multi-reference field in order to link collection items; but then also create single reference fields (which can be displayed within lists), and duplicate the links. May be quicker, but also you could hit the # of reference field limit.


#7

Hey JT, I’ve been struggling with this exact same problem. So far I’ve found four approaches that work OK with tags. All of the require work and compromise, however I thought I’d summarize them here.

#1 - USE MULTIPLE REFERENCE FIELDS, INSTEAD OF A SINGLE MULTI-REFERENCE
Ditch the multi-ref field, and replace it we 3 reference fields to your Tag table. Tag1, Tag2, and Tag3. In your card, you program, style and color each them separately.

PRO - This sorts out your main view problem smoothly
CON - the CMS hosting plan only allows 5 references per table total. Depending on your table design, you may need to upgrade to Business hosting to get 10 references.
CON - if you need your Tag Collection page to display the associated tagged items, it gets a bit awkward because there is no “or” filtering in a Collection List. Therefore you cannot say "show me all cars where Tag1 = the current tag, OR Tag2 = the current tag, etc. Instead, if you have 3 Tag fields, you need 3 collection lists, each filtered to a different Tag. This munts sorting options, but at least you get the right list of items.

#2 - DITCH REFERENCES, AND USE SWITCHES

If you tag cound is manageable, you can put a series of on/off switches in your CMS table, each representing a Tag. That tag is applied when the switch is on.

PRO - Easy to implement.
PRO - No 5-field or 10-field limit, like References have.
CON - Sort order is fixed.
CON - Any tag-info pages have to be static pages, which you manually link to from that tag

#3 - DITCH REFERENCES, AND SPECIFY YOUR TAGS USING A CSV STRING

Pretty sure this works, but I’ve only done a conceptual design so far, details are here.

#4 - USE MULTIREF, THEN EXTRACT YOUR HIERARCHY THROUGH THE WEBFLOW API

This is the gnarliest approach yet. Here you use the CMS as-designed, with a multiref to your Tags table.
Separately, you build some code that will hit the Webflow API, extract your needed info, and build a hierarchy of Item to Refs as JSON, this is published to some URL.
Then, reference that JSON URL, and inject it into your Webflow page.
Now you have the Item to Tag data you need, and using jQuery you can add the correct Tags to each of your cards, including links, colors, etc.

PRO - The only solution that does 100% of what you want.
CON - Programming to create the JSON via the API
CON - Hosting this somewhere
CON - Programming the jQuery to create your styled Tags