richy96
05-04-2011, 12:04 PM
Hi
hopefully the title explains this but anyway:
What I want to do is set things so that some of the modules that make up the vb pages are either expanded or collapsed dependant on some condition in the template
I am using code based on this generic stuff for expandable sections
<tbody>
<tr>
<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('give_a_table_id')"><img id="collapseimg_give_a_table_id" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_give_a_table_id].gif" alt="" border="0" /></a>
any information this is the header
</td>
</tr>
</tbody>
<tbody id="collapseobj_give_a_table_id" style="$vbcollapse[collapseobj_give_a_table_id]">
<tr>
<td class="alt2">any information inside the module</td>
</tr>
</tbody>
It works but I must admit I don't really understand what makes it expand and collapse (like the generated html source looks the same in my browser regardless)
Anyway what I want to do in my templates is something like
<if condition = something or other>
display module expanded when page is generated
<else>
display module collapsed when page is generated
Obviously the user can still collapse/expand manually using the little chevrons
How do I go about doing that?
cheers
Rich
hopefully the title explains this but anyway:
What I want to do is set things so that some of the modules that make up the vb pages are either expanded or collapsed dependant on some condition in the template
I am using code based on this generic stuff for expandable sections
<tbody>
<tr>
<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('give_a_table_id')"><img id="collapseimg_give_a_table_id" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_give_a_table_id].gif" alt="" border="0" /></a>
any information this is the header
</td>
</tr>
</tbody>
<tbody id="collapseobj_give_a_table_id" style="$vbcollapse[collapseobj_give_a_table_id]">
<tr>
<td class="alt2">any information inside the module</td>
</tr>
</tbody>
It works but I must admit I don't really understand what makes it expand and collapse (like the generated html source looks the same in my browser regardless)
Anyway what I want to do in my templates is something like
<if condition = something or other>
display module expanded when page is generated
<else>
display module collapsed when page is generated
Obviously the user can still collapse/expand manually using the little chevrons
How do I go about doing that?
cheers
Rich