Back to top anchor
Documentation

The anatomy of a Sector add-on

User role
Drupal Sitebuilder
Task
Sitebuilding Frontend Backend
Topic
Sector Add-ons
Product
Sector Add-ons

Each element in the Sector Ecosystem follows the same principle - once installed, your editorial team is ready to go. To make this happen, each Sector add-on comes with a set of tools. Some are as you would expect, while some go further.

What makes a Sector add-on a Sector add-on?

Using a consistent approach to the Drupal configuration, add-ons might need to use install hooks back to the Starter Kit, but all Sector components need to deliver more. This includes:

  • Useful and usable sample content 
  • Testplans and code review
  • Online demo 
  • Documentation on Sector.nz
  • Project pages on Drupal.org
  • GitHub repository and composer

So - what does this look like in real life?

Drupal configuration

Each add-on includes a set of preconfigured components. The configuration can include:

  • Content types and preconfigured displays - at a minimum, view modes for default, short teaser, and teaser (all displays are configured to work across automated listings across a Sector site)
  • Consistent content type settings and configured AdminUI form displays to keep everything uniform for editors
  • Consistent view settings and preconfigured view displays - for most content types this includes a page, a teaser block using the teaser view modes, and a short teaser block using the short teaser view modes. 
  • Taxonomies with consistent settings - including descriptions and rabbit hole settings.
  • Drupal blocks if and where required.  

For an example of preconfigured components for an add-on, see the Sector Blog documentation.

Hooks into the Starter Kit 

The add-on might also require a few install hooks back into the Starter Kit. These might include:

  • User permission to hook into the preconfigured user roles in the Starter Kit - or a specific user role if the use case supports this. 
  • XML site map setting (yeah ... we are working on this). 
  • You can also hook into search settings, e.g if you want your content to be indexed by default. 

Useful and usable sample content 

The sample content allows the editorial team to see at one glance how the new feature works.  

  • Sample content is informative and links back to documentation. 
  • Includes the words { sample content }, to be easily found and deleted prior to the site going live.  

For an example, see sample content for Sector Index on the Sector demo.

Testplans and code review

Each Sector add-on has a testplan following the Sector testplan template (coming soon!) and is peer reviewed. Automated tests are a work in progress (they always are).

Online demo

Each add-on is installed on the official Sector demo site - this is the best way to see if everything integrates seamlessly!

Documentation on sector.nz 

Documentation is an important part of the Sector Ecosystem. Each Sector add-on has one or more documentation pages on sector.nz. The mandatory sitebuilder documentation is aimed at sitebuilders - listing all related entities and links to configuration screens (see the Sector Blog documentation page for an example of what is included).

We are also aiming to have an Editor's guide for each add-on - for example, Editing a resource

Project page on Drupal.org

The official home for each Sector add-on is a project page on Drupal.org (like the Drupal page for the Sector Blog ) and each add-on is linked from the Drupal Sector project page. 

GitHub repository and composer

Each add-on can be installed via composer. See the Sector Ecosystem for more.  

Want to get involved? 

Sector is open source and open to contributions! Read more about our Sector Contribution and Governance Model.

Last updated

We are talking at DrupalSouth Hobart 2019
Come and meet us!

Wed 27 Nov - Fri Nov 2019

Need Help?

Sector is brought to you by Sparks Interactive - supporting Sector from Wellington and Auckland

Open Source award winner!

Sparks Interactive are delighted to accept the Open Source Use in Business award for Sector and the Sector.nz open source platform.

Subscribe for Sector updates