Questions about the Tagify component

I have a superficial knowledge for a full use of Tagify, and I need some clarification

I assume that in a mysql database we have an “articles” table with a “category” text field

To manage the categories of individual articles, we have in the back-end an article list page, a new article insertion page and an update page for each article already present in the database.

In the new article insertion page we have a text field “inp_categoria” which we convert into a tagify field

What I don’t understand is how to use the Data Source
Do I have to create a new table in the database with the list of possible categories to tag, or can I create a query that extracts the categories from the same table as the articles already inserted, grouping categories?

And in any case, if when inserting a new article I do not find a specific category in the list, how can I create a new one, or do I have to add it to an external “categories” table?

I hope I have explained my doubts sufficiently, and I think that probably others could have the same expectations as well
Thanks to those who can answer me

It’s better to have a separate table which stores the available categories.

Thanks Teodor
in fact, I thought this too
But I am left with the problem of inserting a new category
I explain myself better; if I am inserting a new article and I have to choose a category that is not yet present in the categories table of the database, how can I add a new one?

A post was split to a new topic: Tagify class and count options

You can create a page flow which checks if the added tag is custom.

Run it on Dynamic Events > Add on tagify. There is a isCustom property available so check it - if true, run the insert new category server action and pass the value to it.

On done event of the page flow, reload the server action which is used as a dynamic event for tagify.

1 Like

Thanks Teodor
yesterday i had a bit of commitments, now i try this suggestion

Here’s a tutorial explaining how to do this:

1 Like