MODX Community

Interacting with Resource TVs Subtabs (Categories)

I’m working on issue #15088 and am looking to figure out how to activate a TV subcategory tab programmatically. From what I can gather, that particular tab panel is rendered to the layout and is not an ext component you can call the activate() method on. If switching tabs normally (by clicking) simply involves dom manipulation, I can work with that but am having trouble identifying where in the codebase this is handled. Any clues would be great!

Nevermind, sometimes I suppose it just takes some time away to find what you’re looking for. After plucking the rendered modx-resource-tvs-div from the browser console, I tracked the source back to manager/templates/resource/sections/tvs.tpl. The component containing the TV tabs is modx-resource-vtabs and can easily be interacted with using Ext.getCmp. I’ll have a PR coming up soon that improves the validation/error handling UX a bit by more reliably focusing on fields with errors when they occur.