can someone help me right a simple piece of code. i am using joomla and i have two modules position that can be at the top of my page. if only one is publised I would like for my table to be centered and 100%. if both are published I would like for it the be centered and 50% each. i would also like to understand what is going on somewhat. thanks!
I think you need to set this up in your site template. In the template, you can get the number of modules that are going to be placed in to the location and then you can do whatever you like with them (eg. change the layout somewhat).
yes i can set it up in my template. what i want to do is write a little piece of code that will split the table if both modules are loaded.
OK, I was actually thinking that you were able to load each module one by one in the template, but that looks a little messy. For the time being, assuming the position you want to change is called 'top', what happens if you replace: mosLoadModules( 'top' ); with: mosLoadModules ( 'top', 1 ); Apparently, the '1' parameter sets the 'horizontal' style for the position. Hopefully this is 'good enough'... in theory, it should do exactly what you want it to...