Separate tags by category in a connectwidgets document

We use tag categories extensively in Connect. We are building a connectwidgets document. I was hoping to have filters by tag category. Instead, all of the child tag names are in one list.
I'm fairly confident that with the built in package functions, this is the only way to do it. Any workarounds? What are chances this might be handled by a future feature in connectwidgets?

1 Like

Howdy @chris_umphlett ! This is a fantastic question. First, are you expecting to have a way to get_content() with a filter? (i.e. you already have a UI element or some condition that you will use to filter your content?). Or are you trying to get_content() and then have a UI element to filter through the content?

I think we do have the ability to set up some types of filters, but we may be missing some documentation, and it would definitely be helpful to understand more about the approach you are targeting :smile: In either case, if we are missing something, we can definitely put that on the issue board for a future connectwidgets feature!

It doesn't look like we currently have a filter for the content items themselves (server side), but the latter (client side filtering) has some examples:


Rereading your question, I just realized you may be looking for more information about what tags are out there, etc. (So you can put them into a select box or something)

If so, then you may be interested in the get_tags() function from the "lower level" package focused on interacting with Connect's Server API directly. The packages are tangentially related right now, with hopes that they may converge at some point in the future.

Thanks Cole. I had our intern who is working on this put together a screenshot to show exactly what code is being used, and what we want to do: 2023-02-01_11-38-17 - TechSmith Screencast - TechSmith Screencast

From your 2nd comment, I'm understanding that we could use get_tags and then within a shiny app we could build our own UI. That's an interesting idea I hadn't considered. We were trying to do this within an Rmd/Quarto document using just the connectwidgets functions to make it simple.

I'm not sure why, but it looks like that screenshot link is not working for me? :open_mouth:

Do you want the static Rmd / Quarto document to still allow folks to filter through the content? In that case, you may be looking for crosstalk or something along those lines. That's a bit of a tricky case to set up :sweat_smile: Should definitely be do-able though! Or you can filter by tags / organize by tags in a static document too!

I fixed the link. some kind of issue with the markdown syntax I used.
I would like people to be able to filter by parent tag category. That to me is more important than having it be a static connectwidgets doc. We have a lot of tags, it will be burdensome for someone to look through them all and try to make sense of it without separating by parent.