Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Newscoop 4.2 Cookbook

Issues

If you've worked on a periodical publication (meaning that it's regularly published on a daily, weekly, monthly or quarterly schedule), you're familiar with the concept of issues. If you come from a blogging background, you're probably used to an unstructured process of publishing your articles. Often blogging systems will create arbitrary issues in your archive by clustering articles, for example in months.

In this chapter we'll look at how Newscoop works with issues, and how each issue's characteristics such as name, publish date and URL can be accessed in the template language.

In Newscoop, each issue can have a separate template assigned to it, meaning that you can have a different layout for different seasons, events or even different layouts for 1-, 2- or 3-column headlines (especially useful for breaking news coverage or slow news days). You can also translate individual issues. And, from the administration interface, you set automated publishing for an entire issue.

From the Newscoop administration interface, you can access the issue details menu by going to Content->publication name and then clicking on the wrench-and-screwdriver Configure icon.

Here is an example template that returns a number of attributes for a given issue:

<h3>Issue No.{{ $gimme->issue->number }}: {{ $gimme->issue->name }}</h3>
<ul>
    <li>Published: {{ $gimme->issue->publish_date|camp_date_format:"%e. %M %Y" }}</li>
    <li>Using template: {{ $gimme->issue->template->name }}</li>
    <li>Inside publication: {{ $gimme->issue->publication->name }}</li>
    <li>URL name: .../{{ $gimme->issue->url_name }}/</li>
    <li>Latest issue? {{ if $gimme->issue->is_current }}yes{{ else }}no{{ /if }}</li>
</ul>

For "The Journal," this displays something like this:

Issue No.13: January 2013

  • Published: 1. January 2013
  • Using template: set_thejournal/front.tpl
  • Inside publication: The Journal
  • URL name: .../jan2013/
  • Latest issue? yes

A full reference of properties for the object $gimme->issue can be found at the end of this manual.

Using 'set' and 'unset' to change values for an issue

In the templates you can also change the values for a given issue. In the following example this is done to include static pages from the first issue:

{{ set_issue number="1" }}
{{ set_section number="5" }}
{{ list_articles }}
    <a href="{{ url options="article" }}" title="{{ $gimme->article->name }}">{{ $gimme->article->name }}</a>
{{ /list_articles }}

You can set the issue name and the issue number. You can reverse the issue to the default value (the value for the default runtime environment of the displayed page):

{{ set_default_issue }}

You can also set the issue to the last published issue:

{{ set_current_issue }}

If you want to drop the information you have set, you can use:

{{ unset_issue }}

Unsetting an issue does not lose the issue value forever. It can be set with the above commands to default, current or an assigned value.

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.