PDA

View Full Version : How to enable more announcements



Cixso
22-12-2009, 11:07 PM
(It's whmcs)

http://www.30mb.co.uk as you can see on the homepage there sub menu called "Latest Announcements". However as you can also see it displays 1 announcement. How can I edit it to show maybe 2 or 3? (yes...I have 2 announcements already)

My code for that page:



<p>{if $announcements}</p>
<h2>{$LANG.latestannouncements}</h2>
<p>{$announcements.0.date} - <a href="{if $seofriendlyurls}announcements/{$announcements.0.id}/{$announcements.0.urlfriendlytitle}.html{else}anno uncements.php?id={$announcements.0.id}{/if}">{$announcements.0.title}</a><br />{$announcements.0.text|strip_tags|truncate:100:"..."}</p>
<p>{/if}</p>

Cixso
23-12-2009, 03:28 AM
Never mind figured it out for my self... lol all I had to do was too duplicate the code and change the numbers.

Now I have three:

<p>{if $announcements}</p>
<h2>{$LANG.latestannouncements}</h2>
<p>{$announcements.0.date} - <a href="{if $seofriendlyurls}announcements/{$announcements.0.id}/{$announcements.0.urlfriendlytitle}.html{else}anno uncements.php?id={$announcements.0.id}{/if}">{$announcements.0.title}</a><br />{$announcements.0.text|strip_tags|truncate:350:"... (Read more by clicking the title.)"}</p>
<p>{$announcements.1.date} - <a href="{if $seofriendlyurls}announcements/{$announcements.1.id}/{$announcements.1.urlfriendlytitle}.html{else}anno uncements.php?id={$announcements.1.id}{/if}">{$announcements.1.title}</a><br />{$announcements.1.text|strip_tags|truncate:350:"... (Read more by clicking the title.)"}</p>
<p>{$announcements.2.date} - <a href="{if $seofriendlyurls}announcements/{$announcements.2.id}/{$announcements.2.urlfriendlytitle}.html{else}anno uncements.php?id={$announcements.2.id}{/if}">{$announcements.2.title}</a><br />{$announcements.2.text|strip_tags|truncate:350:"... (Read more by clicking the title.)"}</p>
<p>{/if}</p>

Want to hide these adverts? Register an account for free!