ibaker
02-09-2010, 05:16 AM
I have asked twice to find a way to have the What's New module (or Random Module) using the Lean Template to display Vertical on the CMPS Home Page and Horizontal across the top of my Dynamics page but have had no easy answers.
So I spent some time working it out today and it is actually very easy to do.
Here is an example of what I mean:
5664
To do this simply open your adv_dyna_entrybit_lean template in the Style Manager
Replace the first two lines:
<tr>
<td class="$bgclass">With:
<if condition="THIS_SCRIPT != 'dyna_index'">
<tr>
<td class="$bgclass" align="center">
<else />
<td class="$bgclass" align="center" width="25%" valign="top">
</if>Note: The 25% width in the above is if you are displaying 4 entries - use 33% if displaying 3, 20% if 5 etc.
Next at the bottom of the template replace:
</tr>With
<if condition="THIS_SCRIPT != 'dyna_index'">
</tr>
</if>To display what I have in the attached images above I removed all the code that wasn't needed so my final adv_dyna_entrybit_lean template is:
<if condition="THIS_SCRIPT != 'dyna_index'">
<tr>
<td class="$bgclass" align="center">
<else />
<td class="$bgclass" align="center" width="25%" valign="top">
</if>
<div style="padding-bottom: $stylevar[cellpadding]px">
<b>$entry[date_added]</b><br />
</div>
<div style="padding-bottom: $stylevar[cellpadding]px">
<a href="$entry[caturl]"><font color="#FF0000"><b>$entry[category]</b></font></a><br />
</div>
<div class="smallfont">
$entry[title]
</div>
</td>
<if condition="THIS_SCRIPT != 'dyna_index'">
</tr>
</if>Hope this helps someone and saves you pulling your hair out if you need to do something like this :)
So I spent some time working it out today and it is actually very easy to do.
Here is an example of what I mean:
5664
To do this simply open your adv_dyna_entrybit_lean template in the Style Manager
Replace the first two lines:
<tr>
<td class="$bgclass">With:
<if condition="THIS_SCRIPT != 'dyna_index'">
<tr>
<td class="$bgclass" align="center">
<else />
<td class="$bgclass" align="center" width="25%" valign="top">
</if>Note: The 25% width in the above is if you are displaying 4 entries - use 33% if displaying 3, 20% if 5 etc.
Next at the bottom of the template replace:
</tr>With
<if condition="THIS_SCRIPT != 'dyna_index'">
</tr>
</if>To display what I have in the attached images above I removed all the code that wasn't needed so my final adv_dyna_entrybit_lean template is:
<if condition="THIS_SCRIPT != 'dyna_index'">
<tr>
<td class="$bgclass" align="center">
<else />
<td class="$bgclass" align="center" width="25%" valign="top">
</if>
<div style="padding-bottom: $stylevar[cellpadding]px">
<b>$entry[date_added]</b><br />
</div>
<div style="padding-bottom: $stylevar[cellpadding]px">
<a href="$entry[caturl]"><font color="#FF0000"><b>$entry[category]</b></font></a><br />
</div>
<div class="smallfont">
$entry[title]
</div>
</td>
<if condition="THIS_SCRIPT != 'dyna_index'">
</tr>
</if>Hope this helps someone and saves you pulling your hair out if you need to do something like this :)