I'm sure I saw before somewhere, specifying a value for xml ifconfig statements (as default is just boolean). Anyways, disabling modules in the admin doesn't actually work (only disables module output). But you can add an ifconfig to your layout file, so for example, to set a template only if a module is disabled is the following:
<action method="setTemplate" ifconfig="advanced/modules_disable_output/Myname_Mymodule">
<template>mytemplate.phtml</template>
</action>
So how could you invert this, so the template is set only if the module is enabled? Something like:
<action method="setTemplate" ifconfig="advanced/modules_disable_output/Myname_Mymodule" value="0">
<template>mytemplate.phtml</template>
</action>