Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

brandleadership/radiant-news-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= 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

About

Simple News Extension for Radiant CMS

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages