Can I make a simple toggle to suspend a card type?

Is there a way to create some kind of… button or toggle that the user can tap and that will suspend a whole card type?

I have a deck with two card types, one for listening and one for reading, in the front. I think listening is more important, so I am tempted to just delete the other card type as it might become boring for some students (I know I prefer just listening and then reading in the back).

However, I am wondering if I can leave this decision to the users of the deck in an easy way. I don’t want to have to explain to them how to go to the browser, select a card type and suspend it. Mostly because it will scare them out and because they might end up messing with other stuff. So I wanted to know if it is possible to add some kind of toggle (maybe in the bottom of my cards or maybe as a sidebar as I’ve seen some decks have), where they could “disable” (suspend) and “enable” this card type with a tap.

Thanks!

1 Like

I may be wrong, but I don’t think something like that it’s possible.

Maybe the easiest thing to do would be to create two subdecks within the main deck, one for each card type.This way, anyone can study both card types (clicking on the main deck) or just one of them (clicking on one of the subdecks).

2 Likes

AnkiDroid has a JavaScriptAPI, which should make it possible in theory. However, the last time i tried to use the API, things didn’t seem to work that well, so i’m not sure how stable it is. Maybe there have been some developments with the recent releases. Also, even if you would manage to do it, this would currently only work on Ankidroid.

I’ve also seen some talk about creating a common interface for JavaScript Addons, which would be shared across the code bases of Anki Desktop, Ankidroid and AnkiMobile. But i think those were early talks, and it didn’t seem, that this would be something coming very soon.

1 Like

Thanks, both. Since this is a subdeck, I would prefer not having even more subdecks, but it is an option for sure.

I think the JavaScript API is too much for me atm. But thanks for the info. I think it was the xiehanzi deck that had a sidebar with several options and I thought something like this could be feasible, but maybe not…

The extra subdeck is the most efficient - you can use ‘deck override’ to automatically have newly-added notes split into the correct decks, and there’s no syncing overhead. You can also accomplish this with a filtered deck that moves all cards of one template away, but then those changes need to be synced even if you later move them back.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.