Managing "news" items in Act

Act can store news items about your conference in the database.

You can edit them through the web interface, and integrate them anywere in the web site. Atom feeds are automatically generated.

Including news in a template or static page

  <div class="newsbox">
    [% FOREACH item = global.news %]
    <p><h3><a href="[% item.link %]">[% item.title %]</a></h3>
    <em>[% date_format(item.datetime, 'datetime_short') %] by [% user_info(item.user) %]</em>
    <br>
    [% item.content %]</p>
    [% END %]
  </div>

The number of items can be limited by supplying a count argument to news:

  [% FOREACH item = global.news(5) %]

Atom feed

News items are available as an Atom feed. The feed's URL is

  /conf_id/atom/en.xml

where en represents the feed's language.

You can make this feed available by including the following line in the <head> section of your pages, for example in your ui template:

  <link rel="alternate" type="application/atom+xml" title="[% global.conference.name %]"
        href="[% global.request.base_url %][% make_uri_info( 'atom', global.request.language ) %].xml" />

Authors

Philippe Bruhat, Éric Cholet

License

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.