Re: latest posts help
| From: | Ashley Sheridan | Date: | Sun, 06 Feb 2011 20:27:12 +0000 |
| Subject: | Re: latest posts help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311173@lists.php.net to get a copy of this message | ||
"Michael Simiyu" <simiyu.michael@gmail.com> wrote:
>hello , am working on showing the last 3 posts showed on a message
>board ( bitweaver ) and i would like to know what to add on the below
>line of code to show the last 3 this is what i have that shows the
>last post
>
>Code:
><a href="{$board.last.url}" title="{$board.last.title|
>default:"Post..."}">{$board.last.title|default:"Post..."|truncate:40}</
>
>a>
>
>
>what should i add to the code above to pull the last 3 posts so i
>could have it like this... (the code below just shows the latest in a
>list format )
>
>Code:
>{if !empty($board.last)}
>» <a href="{$board.last.url}" title="{$board.last.title|
>default:"Post..."}">{$board.last.title|default:"Post...."|truncate:40}</
>
>a>
> <br/>
> » <a href="{$board.last.url}"
>title="{$board.last.title|default:"Post...."}">{$board.last.title|
>default:"Post..."|truncate:40}</a>
> <br/>
> » <a href="{$board.last.url}"
>title="{$board.last.title|default:"Post..."}">{$board.last.title|
>default:"Post..."|truncate:40}</a>
> <br/>
> {/if}
>
>
>
>Best Regards
>Michael S.
This is a php list, so we can only really answer questions about php. That code looks like a smarty
template (although correct me if I'm wrong) while smarty is written in php, they are not the
same thing.
Thanks
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.