decko-commons / decko

Start with a deck of wiki cards. Develop it into a rich web app.
https://www.decko.org
GNU General Public License v3.0
55 stars 15 forks source link

[question] About the list card type and using its content as multiselect #1078

Open localhost opened 3 months ago

localhost commented 3 months ago

Is it possible to have a List card type and have other cards use a multi-select on the values of this list? For example using a CQL search. I tried (e.g. using member_of, but without success.

This would make a good list of tags without polluting the global card namespace. Plus all the tags could be edited in one place.

Or are there more idiomatic ways to achieve something like this?

ethn commented 3 months ago

Yes!

Let's say your option list card is called MyOptions. Then you can set a :content_options rule that is a search card with the CQL {"referred_to_by": "MyOptions"} and apply it to the list of "other cards" you want to have a multi select from that list. Those other cards will also need to be List cards (which you may want to set using a :default rule if it's a field card) and you can set the :input_type to be a multiselect or a radio or whatever you want.

localhost commented 3 months ago

Thanks, I don't entirely understand it, as I haven't done anything with "rules", yet — but I'll try.

Thank you so much for your help and patience.