forked from brandleadership/radiant-news-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
81 lines (55 loc) · 2.66 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
= News
Original Created by Pascal Naef (ScreenConcept), December 2008
This version by Ahmy Yulrizka (ahmy), September 2009
With this news extension you can enter news with headline, leadtext and text in backend. A news will be only displayed if start is greater or equal current date and stop is less or equal current date.
Requirements
For this extension you need a couple of plugin
* calendar data select plugin is required. Further informations are you find here: http://code.google.com/p/calendardateselect/ .
* will paginate. Further information and installation you can see here http://wiki.github.com/mislav/will_paginate/installation
for will_paginate, the easiest way is just using the gem and add 'require "will_paginate"' on “config/environment.rb” as the above site show.
== ENHANCEMENT
* News can be grouped by category
* News can be tagged
* News can be filtered by category or tag also by id
* Limit the news that show up
* Added Date tag
* 2 Page mechanism, (Front Page and Entry Page). Entry page display specific news
== INSTALLATION
1)Install the News Extension
git clone git://github.com/screenconcept/radiant-news-extension.git vendor/extensions/news
2) run migration and update
rake production radiant:extensions:news:migrate
rake radiant:extensions:news:update
3) Start (or restart) your server
== USAGE
Radius Tags
<r:news:current>: Returns all current news
<r:news:headline >: Returns headline
<r:news:leadtext >: Returns leadtext
<r:news:text >: Returns text
<r:news:marquee [behavior="scroll"] [direction="left"] [loop="true"] [scrollamount="1"] [scrolldelay="2"] > : Returns a <marquee>-Tag with all current news and leadtexts.
Basically you'll need 2 page:
1. Front Page. This is the page you want to show more than one news. typically lead text. This page type can be anything.
2. Entry Page. This page show only one news. This page type must be "News Entry"
Example:
1. Front page will be like this
<r:news:current><br>
<r:news:headline /><br>
<r:news:leadtext /><br>
<r:news:link>link_title</r:news:link><br>
</r:news:current><br>
This will show all leadtext of the news and provide the link to the full news.
you can also limit the front page to specific category or tag and also limit the number like this
<r:news:current category="category 1" limit="1"><br>
<r:news:headline /><br>
<r:news:leadtext /><br>
<r:news:link>link_title</r:news:link><br>
</r:news:current><br>
2. The entry page. IMPORTANT: this page type must be "News Entry" and can be only one of this page
<r:news:entry><br>
<r:news:headline /><br>
<r:news:text /><br>
<r:news:link>link_title</r:news:link><br>
</r:news:entry><br>
this will show the full news, without the lead text.
== TODO