10850 Posts in 2517 Topics by 1793 members
|Go to End||Next >|
5 January 2011 at 8:45am
I was gazing through the extensions the other day in hopes of finding some sort of News module or extension for silverstripe.
However I never stumbled upon anything.
Are there any modules that would/could be useful as a news module and how do they work, are there any tutorials on them, in any exists?
//Carsten - Denmark
5 January 2011 at 9:37am
I would advice to create a NewsHolder and NewsArticle pages as also described here: http://doc.silverstripe.org/tutorial:2-extending-a-basic-site
I think there is no module because this is very similar to the Page class in Silverstripe which is
placed in a holder. The Holder Page shows the news by date (new-old) with a link to the detail news article.
Hope this helps a bit.
6 January 2011 at 11:59am
I have a news module available at http://github.com/nyeholt/silverstripe-news which you might find useful. It's not completely documented at all, but is usable in its current state.
One nice feature is that it will perform automatic 'filing' of articles in a date based tree. Typically, you create a top level "News" page of type News Holder, and check the 'automatically file articles' checkbox. After this, create news articles by selecting that News page, and creating a news article as a child - a date based hierarchy will be automatically created beneath that with relevant names, so you should end up with a hierarchy like
Each part of the hierarchy will automatically create an 'archive' type view, so viewing /news/2011/jan will list all the days beneath it and their articles.
Anyway, if you want to give it a go, I'll be happy to answer questions and fix anything you need to get working
2 March 2011 at 1:39pm
@Marcus using your module right now. I like it so far! I'll be sure to come back with some feedback!
2 March 2011 at 1:42pm
@Terry Make sure you grab the latest version (committed about 12 hours ago) that fixes a few bugs when creating a new article in a new month. All feedback welcome
2 March 2011 at 1:44pm
I've already installed it a week ago...I should be able to just lay the new version on top of that right?
then run /dev/build?flush=1
I have noticed when creating a new article and you have the 'Archive' turned on, it creates the new article under the main tree...
2 March 2011 at 2:59pm
Yep, should just go over the top
It doesn't actually create it there, it just appears under the main tree due to the tree not having the new parent exposed (or it might not even exist until after the article is created). I've been considering making it automatically expand down the tree to the new point, but it's a somewhat handy side-effect having it directly available in the tree (it then appears to be 'filed' later).
2 March 2011 at 3:34pm Last edited: 2 March 2011 3:56pm
Next thing I have noticed...there is a HtmlEditorField for "Article Summary (displayed in listings)" but it's never used in your default templates. Even though it says it is displayed in the listings (I assumed it was probably the NewsHolder template for the list of News Articles. I looked in the templates and it uses
When in my opinion it should just be
Just a little confusing to the end user because that field never shows up in the default templates until the actual News Article (NewsArticle.ss). I know that's nit picky...and it's a templating issue that's easily solved, but out of the box it could be a bit confusing. I wouldn't expect to see the summary on the main article page....seems redundant.
Also found this in the template NewsListItem:
<% if Thumbnail %>$Thumbnail.SetRatioSize(50,50)<% end_if %>
but haven't seen a place in the CMS to load a thumbnail or even a news article photo. I've just been adding them into the Content section of the CMS for each article. Not sure if thats new and hasn't been fully integrated yet. I didn't notice this a week ago.
|Go to Top||Next >|