Carma news
From TMM Wiki
Jump to navigationJump to searchcarma_news
- Purpose: Display news from a specific news section.
- Example: {carma_news count=5 start=0 section="main"}
- Required: none
- Optional: count, start, section, tpl, data_only, assign_prefix, assign, display_on_assign, order
- Default Templates Used: news
- Variables created: $carma_news, $params
Parameters
(Required parameters in bold)
Parameter | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
count | Show this many comments | Any whole number greater than zero | 5 (Shows 5 comments) | count=20 |
start | Don't show the comments lower than this number | Any whole number, zero or greater | 0 (Shows all comments) | start=20 |
section | Use this news section | Any valid section name | main | section="my_section" |
tpl | Display comments using this template | Any valid template name | comments_display (Display comments using the comments_display template) | tpl="my_template" |
data_only | Put the comments in an array | 1 | None. Displays comments | data_only=1 |
real_date | Force the news to use the real date when using other publish modes | 1 | None. Does not force use of the real date | real_date="1" |
assign_prefix | Prefix output variables with this word. (Click link for details) | Any valid Smarty variable name | None. (No prefix is used) | assign_prefix="myvar" |
assign | Name of the Smarty variable that stores the output | Any valid Smarty variable name | None. Output is displayed, not stored | assign="my_var" |
display_on_assign | Display comments even when the assign parameter (above) is used | 1 | None If assign is used, no comments are displayed | display_on_assign=1 |
order | Change the order that the news is displayed | added (sort by date added newest to oldest) or subject (sort alphabetical order by subject | date added, oldest to newest | order="subject" |
Description
Displays the latest news.