Standard ---> Article ---> catid as it is wrote in the tutorial
Standard ---> Category ---> parent_id
And it works. I could create a SubCategory.
But now I need to create Articles in the just created SubCategory, and this method doesn't shows SUB-subcategories of the selected parent_id, unlike the standart "Category id" does. If I use the same parent_id=25 it shows only subcategories which has parent_id set to 25 and not their SUB-subcategories.
Ok probably is a little bit confused but... my question is:
Is there a way to use Select Dynamic Fieldalso to show SUB-SubCategories (not only subcategories) of a Parent Category?
Not sure if there's an easier way but this is what worked for me, so hopefully will work for you too.
In the 'Select Dynamic' field, you can set the 'Query' drop down to 'Free' and add your own SQL. Paste this into the 'SQL Query' box:
SELECT CONCAT( REPEAT('-', (category.level)-1), category.title) AS text, category.id AS value
FROM #__categories AS category LEFT JOIN #__categories AS parent ON category.lft BETWEEN parent.lft AND parent.rgt WHERE parent.id = 25 ORDER BY category.lft
Then set the storage as 'catid'.
You can edit the SQL to remove the hypens if you don't need them, they're just there for formatting the dropdown.