Download the PHP package craftcms/anchors without Composer

On this page you can find all versions of the php package craftcms/anchors. 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 anchors

Anchors for Craft CMS

This plugin makes it possible to automatically add linkable anchors to HTML headings in Craft.

The anchors are named based on the heading text. The algorithm Anchors uses to convert the heading text to IDs is similar to Craft’s algorithm for automatically generating entry slugs.

Requirements

This plugin requires Craft CMS 4.0.0+ or 5.0.0+.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Anchors”. Then click on the “Install” button in its modal window.

With Composer

Open your terminal and run the following commands:

Templating

To use Anchors in your templates, just pass some HTML into the |anchors filter.

By default, the anchors filter will only search for <h1>, <h2>, and <h3> tags. You can customize which tags it searches for by passing in a comma-separated list of tag names.

The anchors filter will convert any non-ASCII characters to ASCII, using the current site’s language’s ASCII character mappings by default.

If you are displaying content in a different language than the current site, use the language argument to override which ASCII character mappings should be used:

By default, anchors filter will lowercase words that are all uppercase and lowercase the first letter in any other case.

If you want the anchors to always be lowercase, you can use the lowercase argument:

Configuration

To configure Anchors, create a new anchors.php file within the config/ folder, which returns an array.

The following config settings are supported:

Plugin API

Other plugins can take advantage of Anchors using the provided API.

Like the |anchors templating filter, parseHtml() also allows you to specify which HTML tags should get anchors.

You can also pass some heading text directly into Anchors to get its generated anchor name:


All versions of anchors with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
craftcms/cms Version ^4.0.0-RC2|^5.0.0-beta.1
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 craftcms/anchors contains the following files

Loading the files please wait ....