PDA

View Full Version : How do I write a conditional to determin if a module is in the center column?


DeMiNe0
20 Mar 2006, 04:31
How do I write a conditional to determin if a module is in the center column?

I want to have a different table head class for every module that is in the center column of the page. How wouldi write a conditional to determin if a module is in the center of a page?

So for example, i could have my adv_portal_module_shell Look like this:

<if conditional="IS CENTER COLUMN"> would be the conditional I am looking for.

$mods[formcode]

<if condition="IS CENTER COLUMN">
<table width="100%" class="tcat" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="88" height="26" align="left" valign="top"><img src="$stylevar[imgdir_misc]/cat_left.gif" alt=" " border="0" /></td>
<td width="100%" class="tcat" align="center"><div class="smallfont"><strong>$vbphrase[whats_going_on]</strong></div></td>
<td width="88" height="26" align="right" valign="top"><img src="$stylevar[imgdir_misc]/cat_right.gif" alt=" " border="0" /></td>
</tr>
</table>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<else />
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="$mods[colspan]">
<if condition="$vba_style['portal_collapsemods']">
<a href="#top" onclick="return toggle_collapse('module_$mods[collapse]')" style="float:$stylevar[right]"><img alt="" border="0" id="collapseimg_module_$mods[collapse]" src="$stylevar[imgdir_button]/collapse_tcat$modimgcollapse.gif" /></a>
</if>
<span class="smallfont"><strong>$vba_style[portal_blockbullet] <if condition="$mods['link']"><a href="$mods[link]">$mods[title]</a><else />$mods[title]</if></strong></span></td>
</tr>
</thead>
</if>
<tbody>
<if condition="$show['tablerow']">
<tr>
<td class="$bgclass">
$modulehtml
</td>
</tr>
<else />
$modulehtml
</if>
</tbody>
</table>
<div><img src="$vboptions[bburl]/$vboptions[cleargifurl]" height="$vba_style[portal_vspace]" alt="" /></div>

<if condition="$mods['formcode']"></form></if>