PDA

View Full Version : [How To] What's New Verticles on CMPS and Horizontal on Dynamics


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 :)

angeljs
01-17-2011, 09:09 AM
Thank you, thank you, thank you!!! :)

Our Sponsors
 

angeljs
05-08-2011, 06:51 AM
Do you know of any way to incorporate this into vBadvanced 2 for vB4?

angeljs
09-30-2011, 04:13 AM
For some reason, even though the module for vBa CMPS uses the exact same templates and files as vBa Dynamics, the featured module for CMPS still shows vertically. Is there any way to show these horizontally on the front page of CMPS? I've tried editing the 'adv_portal_module_wrapper' template, but don't really know what I'm doing! :(