About UncosNews
This is a very simple but very useful component for MODx Revolution lets you create on your site a simple page with the news.All news are stored in a separate database table, and therefore will not interfere in the resource tree.Simple and easy menu for adding and editing of news in the Components.News can be displayed in any form, anywhere on the site like list of recent news or a single extended news.UncosNews can also be used for just anything. For example, for a mini blog, or a list of anything useful for displaying quotes or sponsored links.In any place on your site! Just add a call of snippet.
Information
Released
March 24, 2011
Supported Database
MySQL
License
GPLv3
Supported Versions
2.0 - <2.1
Downloads
3,642
Instructions
Please follow this http://unglued.ru/makingof/uncosnews/ for instrucions on Russian language.
Install the package with package manager and then:
Snippet: [[!UncosNews]]
Params (with default values)
- &tpl=`rowTpl` - Chunk for news lists
- &fulltpl=`fullTpl` - Chunk for one full news item
- &sort=`id` - Which field to sort news (id:By ordinal, title: By title, desc: By short desc, text: By text, createdon: By creation date, editedon: By date editing)
- &dir=`DESC` - Sort direction (ASC or DESC)
- &limit=`0` - Number of news from news list (0 - no limit)
- &newsPage=`` - ID News page, where is show full newsitem (default current page)
- &expand=`true` - if set `0` - disables display the full news in this snippet call (useful if on the same page present news list and full news)
Placeholders:
- [[+createdby]] - Author id
- [[+user.fullname]] - Author fullname
- [[+user.username]] - Author username (aka login)
- [[+createdon:strtotime:date=`%d.%m.%Y`]] - creation date (with output filter for example, default format: YYYY-MM-DD)
- [[+editedon:strtotime:date=`%d.%m.%Y`]] - date editing
- [[+editedby]] - ID, who's edited news
- [[+url]] - url to extended news (full)
- [[+title]] - Title
- [[+desc]] - Short description
- [[+text]] - Full news item text
Examples:
Say you have a news page with ID 55 and the left column contains 3 fresh headlines. Then for the withdrawal of the news stream in the column we call a snippet:
[[!UncosNews? & tpl = `NewsListTpl` & limit = `3`& newsPage =`55`& expand =`0`]]
Where &tpl - chunk to the news stream, &limit - the number of titles, &newsPage - news page, which will be displayed expanded news and &expand - the prohibition on the display of extended news in the left column. For the news page with ID 55 call the snippet will be quite simple:
[[!UncosNews? & tpl = `FullNewsListTpl` & fulltpl = `FullNewsItemTpl`]]
Where &tpl - chunk to news feed on the news page, &fulltpl - chunk to the one expanded news item.
Thanks for using.
New in 1.0.1-rc1
03.30.2011
- added fix for users, who not use frendly urls