cu-boulder/ucb_campus_news
Composer 安装命令:
composer require cu-boulder/ucb_campus_news
包简介
Provides a block for CU Boulder campus news.
README 文档
README
This Drupal module contains the Campus News block, which pulls news articles from CU Boulder Today using the JSON API.
Dependencies
- CU Boulder Styled Block
- Needed on every site with CU Boulder Campus News installed.
- CU Boulder Article Syndication
- Needed on the Today site only.
Major Releases
- Fall 2022: Initial support for the Drupal 7 (legacy) Today site (v1.0).
- Fall 2024: Initial support for the modern Today site JSON API (v2.0).
Why is a custom module needed for this block specifically?
The Campus News block editing form automatically pulls existing taxonomy terms for category, audience, and unit from the CU Boulder Today site to enable filtering (audience and unit are added by the CU Boulder Article Syndication module installed on the Today site). Due to the way Drupal handles block types, we determined this wasn't feasable with a standard block type.
The Campus News block is a programatic block written in PHP & JavaScript with some JavaScript trickery to make the asynchronous fetching of terms possible. When the editor saves these filters, the term ids are stored and used in subsequent API requests to provide the correct news articles to viewers.
统计信息
- 总下载量: 93.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2022-11-01