This project is not covered by Drupal’s security advisory policy.

The Opera module constructs an opera (document/manual/tutorial), with a page
turner and an index attached to each node. An opera starts at any menu item
chosen as the root and descends node by node.

Features

This module assembles a set of nodes to form an opera. This set of nodes can be
navigated randomly via the index or sequentially via a page turner (prev next
links); both of which are attached to each node.

Opera uses the menu and node modules from Drupal core, the contributed pathauto
module and pure JavaScript. A user creates an opera by choosing a menu node that
defines the top page of the opera, and giving the opera an unique name. The opera
module adds an index and page turner to each of the nodes allowing the user to
sequentially access the nodes in the menu tree, or randomly access any node in
the menu tree using the index.

There are no restrictions on the number of opera. The root could be any menu
item in the tree, not necessarily the top menu item. Opera can be created,
edited, or deleted without affecting the nodes or the menu tree.

The primary use cases for this module are:

- Use case #1 **To create an opera:** a document, a manual, a tutorial, or
simply a set of nodes that need to be viewed in a sequence via a page turner
or randomly via an index.

- Use case #2 **Module Docs:** A module_docs submodule can be created for your
custom/contrib module that can easily generate a set of document pages. The
user can enable this module if needed and create the document pages. When the
module is installed, opera nodes are created from an array of title and content
and assembled in a menu. When the module_docs is uninstalled the opera nodes
and the associated index are automatically erased.

To create module docs for your custom/contrib module:
* Run the drush generate command as follows:
drush generate opera:docs

* Enter the module machine name for which the submodule is needed.

* Enter the number of nodes you would expect to create. You can create the
nodes later if needed. If you want to create place holders for the nodes,
simply press enter for the title and body of each node.

The submodule will be created inside your module at
MODULE/modules/MODULE_docs

* Populate the title and content of the nodes.

Post-Installation

- #1 User creates an opera at the Add opera page
/admin/config/opera/settings.
- #2 Adds an unique opera name.
- #3 Selects the menu root that would be the first page of the opera. Then
saves the opera. The opera is created and available at the URL alias of
the menu root which is the first page of the opera.
- #4 To edit the opera, the user deletes it and creates a new
one, without any loss of content or structure.
- #5 To delete the opera, the user goes to the Delete opera
page at "/admin/config/opera/settings/edit".

Additional Requirements

This module depends on the drupal core modules and a contributed module.
1. pathauto

N/A

Similar projects

There are similarities with the Book module and derivatives thereof.

This module provides a tool to create module docs for contributed modules. It
can create documents from an array of titles and body content and hence can be
shipped as a submodule of any contributed module to create module docs on the
fly. It is light-weight and is independent of modules other than those in the
Drupal core and the pathauto module. The nodes can belong to any content type
with a caveat that an index and page turner will be displayed with the node.

Supporting this Module

Community Documentation

Install the opera_demo module to get detailed documentation of the opera
module and is a good tutorial on how to create opera.

Project information

  • Created by puffoon on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases