Coder Social home page Coder Social logo

kotti_newsitem's Introduction

kotti_newsitem

build status production

News Item content type for Kotti.

This package provides:

  • a NewsItem content type that is just a Document with a different default view,
  • a news_listing view that provides an alternative default view for Document, for listing most recent published NewsItems on a full-page style display,
  • a RecentNews widget for showing most recent published NewsItems in a slot, and
  • an all_news view that shows ALL News Items in your site, chronologically ordered.

Find out more about Kotti

Setup

To activate the kotti_newsitem add-on in your Kotti site, you need to add an entry to the kotti.configurators setting in your Paste Deploy config. If you don't have a kotti.configurators option, add one. The line in your [app:main] (or [app:kotti], depending on how you setup Fanstatic) section could then look like this:

kotti.configurators = kotti_newsitem.kotti_configure

Configuration

A good approach for managing news items on your site is to make a private container document for holding the actual news items. It is a good idea to organize them somehow, as by year:

news-items
    2013
        news-item-foo
        news-item-bar
        ...
    2014
        ...

This is primarily to help the content creator organize content, but it could also be used as a "manual" way of presenting news items if published. Display of most recent news items can be done either by selecting News Listing for the default view of a Document, or by using the recent news widget in a slot.

News Listing

For a full-page listing of most recent news items, add a Document, usually at the top-level of your site and titled "News", and set its default view to News Listing. Control the number of recent items shown with:

kotti_newsitem.num_news = 10

At the bottom of the list of news items, regardless of the number of recent news items listed, is a link to a page for All News, where all news items are shown.

Recent News Widget

If you want the RecentNews widget to show up in your site in a slot, either in place of a dedicated full-page news listing or to augment it, you have to add a line like this to enable the recent news widget:

kotti_newsitem.widget.slot = right

The for a list of available slots in a default Kotti site see the kotti.view.slots API docs

To change the default number of recent news items shown in the widget (5), add a line like this:

kotti_newsitem.widget.num_news = 10

Note

kotti_newsitem.num_news controls the number of items shown in a news listing; kotti_newsitem.widget.num_news does the same for the widget. For example, you might have the news listing set to show 10, but the widget only 2.

Development

build status master

Contributions to kotti_newsitem are highly welcome. Just clone its Github repository and submit your contributions as pull requests.

kotti_newsitem's People

Contributors

disko avatar geojeff avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

geojeff

kotti_newsitem's Issues

Bad Kotti Browser pop-up trying to insert an image or link while creating a news item

When editing a news item for the first time (creating it), if I try to insert an image or a link and click on the browsing button, I get a pop-up with the title "Kotti Browser", but instead of the actual Kotti Browser that pop-up contains a form for creating yet another news item.

The Kotti Browser pop-up shows up nicely again when editing a previously created news item.

The same happens in the case of kotti_calendar events, so I'm not sure if this is a problem with these content types or some bug in Kotti itself.

[tested in a Debian Wheezy machine, within a virtualenv with Kotti 0.9.2, kotti_calendar 0.7, kotti_media 0.5.1, kotti_navigation 0.4a2, kotti_newsitem 0.2]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.