/Core-CMS-Plugin-Static-Article-Preview

A DjangoCMS plugin (for TACC Core CMS) to render a static preview of content from an article.

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Texas Advanced Computing Center

Django CMS Plugin: "(Static) Article Preview"

This plugin renders a static preview of content from an article.

  • __dist-name__: djangocms-tacc-static-article-preview
  • __package_name__: djangocms_tacc_static_article_preview
  • __ClassName__: TaccsiteStaticArticlePreview
  • "Plugin Name": "(Static) Article Preview"
Intent

This plugin only exists because of the unavailaibility of a solution to sync news between two TACC websites. To learn more, see TACC/Core-CMS wiki page "Static-Article-Plugins".

Quick Start

  1. Follow https://github.com/tacc-wbomar/Core-CMS-Plugin/wiki/Core-CMS-Plugin-Usage-Quick-Start.

Usage

  1. Add instance of djangocms_tacc_static_article_list to a page.
  2. Configure the plugin instance.
  3. Add instance of this plugin within a djangocms_tacc_static_article_list.
  4. See plugin render content that matches configuration.

Features

  1. Render an <article> with content using semantic markup.

  2. Support previews of different kinds of articles.

    kind description content
    News external news articles image, type, date published, title, abstract
    Documents single-topic documents title, abstract
    Allocations date range for applications image, title, date (or range)
    Events learning opportunities date (or range), title, abstract
  3. Only supported as nested within djangocms_tacc_static_article_list of the same kind.

  4. Inteligently renders date or date range for some kinds of articles.

    kind outputs
    Allocations date or range (with appropriate English)
    Events date or range (with dash "–" as needed)
    render method for which dates
    range a date range within which the current date lies
    next future date a publish and/or expiry date that is in the future
    last past date a publish and/or expiry date that is in the past

    For examples of Allocation dates, see docs/allocation-dates.md.

  5. Renders supported, nested plugin instances to incorporate extra content.

    content supported by
    image djangocms-picture
    " djangocms_bootstrap4's bootstrap4_picture
  6. Uses supported, integrated plugin instances to incorporate extra features.

    feature supported by
    article preview as hyperlink djangocms_tacc_data_list
  7. Supports (but does not render) author.

Caveats

  1. Requires djangocms_link.*
  2. Expects djangocms_tacc_static_article_list.†
  3. Hyperlink is within title tag (does not wrap article).‡

* Support is optional but plugin is assummed, so plugin is required. This could change in a future release.

† A plugin instance is not allowed except inside this parent plugin.

‡ So the entire article is not a link. To add this support to your app, stretch the link. To add this support to this app, this plugin could render <a> like djangocms_tacc_callout.