Loading...
 
Skip to main content

History: Article Handler

Source of version: 3 (current)

Copy to clipboard
            This is a ((handler)) to create articles (news items). 

{CODE(caption=>YAML)}
preferences: 
 feature_articles: y
objects:
 -
  type: article_type
  ref: type
  data:
   name: New Type
   allow: [ ratings, comments ]
   show: [ author, reads, language ]
 -
  type: topic
  ref: topic
  data:
   name: New Topic
 -
  type: article
  ref: article
  data:
   title: Hello World!
   body: Thanks for reading this announcement, even if it contains nothing of value.
   heading: Read on...
   type: $type
   topic: $topic
{CODE}

! Topic Object
||__Name__|__Mandatory__|__Value__
name|yes|Topic name
||

! Article Type Object
||__Name__|__Mandatory__|__Value__
name|yes|Article type label
show| |pre_publication
| |post_expire
| |heading_only
| |image
| |avatar
| |author
| |publication_date
| |expiration_date
| |reads
| |size
| |topline
| |subtitle
| |link_to
| |image_caption
| |language
allow| |ratings
| |comments
| |comments_rating_article
| |creator_edit
||

! Article Object
||__Name__|__Mandatory__|__Value__
title|yes|Article title
topic|yes|Article topic (see Topic Object)
body|yes|Article content
type| |Article type, defaults to Article
author| |Full author name
heading| |Summary of the article displayed in listings
publication_date| |Defaults to install time
expiration_date| |Defaults to 30 days after install time
topline| |
subtitle| |
link_to| |
language| |Defaults to en
geolocation| |Format is "lon,lat,zoom". Example: ''-2.373046875,40.507118572962,3'' (>=12.0)
||