Download the PHP package drunomics/anchor_navigation without Composer

On this page you can find all versions of the php package drunomics/anchor_navigation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package anchor_navigation

Anchor Navigation

Table of contents

Overview

The anchor navigation is a plugin to create a table of contents menu out of the paragraph headlines from a node.

Usage

When enabled, the editor can select a checkbox to trigger the creation of the table of contents for the node. The table of contents will be saved in a text- field and can be edited. The editor can change the label or remove entries individually.

After paragraphs are added or modified, the table of content generation must be triggered again by selecting the checkbox for it.

The element will only be rendered if the table of contents is not empty.

Setup

1. Attaching anchors to paragraphs

Add the Anchor-field to the paragraphs types which should provide an anchor for the anchor navigation. The anchor form will show up only if the content type also has the anchor navigation field attached to it (see below).

You can setup a fallback field which will be used for the anchor label if the anchor label is not filled out for a specific paragraph.

Make sure the field is positioned at the beginning of the paragraph in their respective viewmodes.

2. Configuring content types

Add the Anchor navigation-field to the content types which should display the navigation.

The Anchor-fields (and their form) will only be rendered if a content type has the anchor navigation attached to it.

Setup the form display & display mode for the Anchor navigation-field:

In the field formatter, there is the option to either render the field as a field or as a block. Selecting field will position it as configured in the entity viewmode. Alternatively when selecting block, add the Anchor navigation-block in the block layout to position the element. Either way, the field must be added to the viewmode on which it should be rendered (even if block rendering is selected).

3. Positioning the anchor

Depending on your styling and media queries you have to move the anchor so that the navigation jumps to the correct position.

Here an example which moves the anchor up to account for the drupal 8 toolbar:

4. Styling and setting up the navigation display

Update anchor_navigation.settings.yml to setup the display

breakpoints Array of objects You can set any number of breakpoints and for each breakpoints

highlightColor String Any valid css color value, will be set as the color for the navigation, be default affects only the icons color.

displaySettings For each display variant ('sticky' or 'fixed') you can set:

Example:

5. Injecting social icons

There is a menu reserved for the social icons which is hidden by default. If you have social icons on your page, you can attach them to the anchor navigation by setting the social_icons-variable via preprocess hook, e.g.: YOUR_MODULE_preprocess_anchor_navigation().

Make sure to style the icons for both the fixed and sticky variant.


All versions of anchor_navigation with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package drunomics/anchor_navigation contains the following files

Loading the files please wait ....