Quote from abda53 on June 30, 2022, 20:14
So it works, but in order to use ready_chain, you need to specify the ID's that it will go into.. which is fine if you know the ID chain - but on dynamic pages, that isn't possible.
For example, I am using the plugin on a video upload page where the user can select the category the video goes into. This works great on new videos, but when editing the video I won't know what category chain to use because it is stored in the database (it should reflect the chain that they last used for that video).
I ended up solving this by writing a script that parses and caches the existing category tree and loops through the category to find child/parent relationships. Then I can cross reference that with the category ID that they selected previously which would then tell me the correct category tree to use, which I can then inject into the shortcode ready_chain attribute.
Ideally it would be great if there was a way to do this within the plugin itself instead of having to hardcode the ID chain.
I'm also just nit picking.. I was able to overcome this, but most people probably wouldn't know how to
So it works, but in order to use ready_chain, you need to specify the ID's that it will go into.. which is fine if you know the ID chain - but on dynamic pages, that isn't possible.
For example, I am using the plugin on a video upload page where the user can select the category the video goes into. This works great on new videos, but when editing the video I won't know what category chain to use because it is stored in the database (it should reflect the chain that they last used for that video).
I ended up solving this by writing a script that parses and caches the existing category tree and loops through the category to find child/parent relationships. Then I can cross reference that with the category ID that they selected previously which would then tell me the correct category tree to use, which I can then inject into the shortcode ready_chain attribute.
Ideally it would be great if there was a way to do this within the plugin itself instead of having to hardcode the ID chain.
I'm also just nit picking.. I was able to overcome this, but most people probably wouldn't know how to