I’m developing a project and trying to create a very abstract section. What I mean is that the user will be able to choose a value from tv singe select and the associated tab on the left will appear - please see below:
I called it “dynamic tab”. I will have more than 2 tabs in the future but will have more and it would be very useful to be able to control it this way.
Have anybody done something like that or similar, or maybe there is a better solution?
Thanks for your reply. i have seen this plugin however we don’t want to depend on external modules… Would be great to have own solution in case the plugin gets depreciated or broken in the next modx versions.
I have looked into the code and I’m a bit confused, never had to use ext.js…
In my head i got idea that i catch single select tv and in my “change or select” event listener i check if the value is equal to category tab if yes then hide the others…
Below its my code how to get to tv name (fbColType) settings however it does not work…
MODx.on('ready', function() {
// Assuming 'mySingleSelectTV' is the name of your single select TV
var singleSelectTV = MODx.load({
xtype: 'modx-combo',
name: 'fbColType',
hiddenName: 'fbColType',
renderTo: Ext.getBody(),
triggerAction: 'all',
allowBlank: true,
listeners: {
'change': function(combo, newValue, oldValue) {
console.log(oldValue)
}
}
});
});
Do you have any idea how is it suppose to be done or can you point me into right documentation?
Well, i had a look on the source code from your plugin, however could not work out how to get to my tv. I don’t want to change my tv values or anything like that, all i need is to able to grab my single single select TV (fbColType) and attach a listener (select) to that. Could you please show example or point me into ToggleTVSet how to achieve that?