One way I can think of off the top of my head is to make the main section theme a switch. What I mean is, set it up to include a different template based on the section being viewed. Either by using the section id or some other variable set in the sections document to be used in smarty as a switch.
I do this all the time in my themes to allow different templates for different modules. By using the theme.html as a switch, I can include different templates for each module. So when someone is viewing the news module, the news.html theme is included into the theme.html template to beused for layouts specific to the news module.
Here's the code I use in my theme.html to make this happen:
<{php}>
if(is_object($GLOBALS['xoopsTpl'])){
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', $dirname );
}
<{/php}>
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<meta name="robots" content="<{$xoops_meta_robots}>" />
<meta name="keywords" content="<{$xoops_meta_keywords}>" />
<meta name="description" content="<{$xoops_meta_description}>" />
<meta name="rating" content="<{$xoops_meta_rating}>" />
<meta name="author" content="<{$xoops_meta_author}>" />
<meta name="copyright" content="<{$xoops_meta_copyright}>" />
<meta name="generator" content="XOOPS" />
<{$metaextra}>
<title><{$xoops_sitename}> - <{$xoops_pagetitle}>title>
<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
<script type='text/javascript' src='/standard.js'>script>
<{$xoops_module_header}>
<{$metaextra}>
<script type="text/javascript">
script>
head>
<body>
<{if $xoops_cmod != "system" && $xoops_cmod != ""}>
<{include file="marketing/$xoops_cmod.html"}>
<{else}>
<{include file="marketing/system.html"}>
<{/if}>
body>
html>
Basically the small section at the top is used to determine what module is currently being viewed:
<{php}>
if(is_object($GLOBALS['xoopsTpl'])){
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', $dirname );
}
<{/php}>
Then in the body of the theme I invlude the appropriate theme for the module.
<{if $xoops_cmod != "system" && $xoops_cmod != ""}>
<{include file="marketing/$xoops_cmod.html"}>
<{else}>
<{include file="marketing/system.html"}>
<{/if}>
The way this works is it includes the module theme using Module_name.html. So in my themes folder I have a template for each module (example: news.html or wfsection.html).
If no module is found or the module variable is blank, like for the homepage, I include a default system.html template to be used.
You can get much more complex then this, but I won't get into that as it usualy has a limited application.
This ystem is nice for things like making the forum module 100%, while having the rest of the site in a fixed width.