Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
apostrophe-events
Advanced tools
Changelog
2.2.0 2022-08-31
An event can now be repeated (selecting recurring type) after editing it, not only after saving it for the first time.
Readme
This bundle provides a complete foundation for displaying upcoming events with the Apostrophe CMS.
The bundle consists of three Apostrophe modules (in a single npm module):
apostrophe-events
apostrophe-events-pages
apostrophe-events-widgets
The apostrophe-events
module provides the ability to create and edit events and manage their start and end dates and times. There is support for repeating events.
The apostrophe-events-pages
module displays events on a page. It extends the apostrophe-pieces-pages
module. The default view displays only upcoming events.
The apostrophe-events-widgets
module provides an apostrophe-events
widget, which you can use to select events to appear anywhere on your site. Events that have ended do not appear in widgets.
These three modules extend apostrophe-pieces
, apostrophe-pieces-pages
and apostrophe-pieces-widgets
, and you can extend them further as well.
For a single collection of events:
// in app.js
// We must declare the bundle!
bundles: [ 'apostrophe-events' ],
modules: {
'apostrophe-events': {},
'apostrophe-events-pages': {},
'apostrophe-events-widgets': {},
'apostrophe-pages': {
// We must list `apostrophe-events-page` as one of the available page types
types: [
{
name: 'apostrophe-events-page',
label: 'events'
},
{
name: 'default',
label: 'Default'
},
{
name: 'home',
label: 'Home'
}
]
}
}
One way to create two or more distinct collections of events is to create separate events pages on the site, and use the "with these tags" feature to display only events with certain tags.
Another approach is to extend
the modules, creating new modules and a completely separate admin bar item for managing the content. If you take this approach, you must set a distinct name
property when configuring your subclass of apostrophe-events
, such as meeting
. This will be value of type
in the database for each event of this subclass.
The latter approach is often best as it requires less user training to avoid confusion. The former approach has its own advantages, notably that it is easier to aggregate content and have it appear in multiple places intentionally.
The apostrophe-events
module provides cursor filters named year
, month
, and day
. For year
the value should be a 4-digit year. For month
the value should be in YYYY-MM
format. For day
the value should be in YYYY-MM-DD
format.
All events which are in progress at any point during the specified year, month or day will be included in the results.
These filters are marked safeFor: public
and can be used with the piecesFilters
option in apostrophe-events-pages
.
For example:
// in lib/modules/apostrophe-events-pages/index.js
piecesFilters: [
{
name: 'year'
}
]
<!-- In lib/modules/apostrophe-events-pages/views/index.html -->
<li><a class="{{ 'active' if not data.query.year }}" href="{{ here({ year: null }) }}">Upcoming</a></li>
{% for year in data.piecesFilters.year %}
<li><a class="{{ 'active' if data.query.year == year.value }}" href="{{ here({ year: year.value }) }}">{{ year.label }}</a></li>
{% endfor %}
FAQs
Calendar of events for the Apostrophe content management system
The npm package apostrophe-events receives a total of 158 weekly downloads. As such, apostrophe-events popularity was classified as not popular.
We found that apostrophe-events demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.