Download the PHP package bennothommo/wn-meta-plugin without Composer

On this page you can find all versions of the php package bennothommo/wn-meta-plugin. 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 wn-meta-plugin

Meta plugin

Provides an easy interface to allow Winter CMS plugins to insert HTML <meta> and <link> tags, as well as JSON-LD blocks into a layout or page. The plugin provides three helper classes to populate the meta and link tags or JSON-LD blocks, and a component each to inject them into a Winter CMS layout, partial or page file.

Usage

For theme developers

Three components are provided to inject the meta and link tags or JSON-LD blocks into your theme - metaList, linkList and jsonLdList.

Meta tags

Add the Meta -> Meta List component to your page and add the following line where you would like the meta tags to be inserted. This should preferably be inside the <head> tag.

Meta tags will be generated in the following structure:

Two options are also provided with the component:

Link tags

Add the Meta -> Link List component to your page and add the following line where you would like the link tags to be inserted. As above, this should also preferably be inside the <head> tag.

Link tags will be generated in the following structure:

An option is also provided with the component:

JSON-LD blocks

Add the Meta -> JSON-LD List component to your page and add the following line where you would like the JSON-LD blocks to be inserted. As above, this should also preferably be inside the <head> tag, beneath all <meta> and <link> tags.

JSON-LD blocks will be generated in the following structure:

An option is also provided with the component:


For plugin developers

If you wish to use this plugin to provide meta and link tags or JSON-LD block content on sites that your plugin is installed on, you can use the \BennoThommo\Meta\Meta, \BennoThommo\Meta\Link and \BennoThommo\Meta\JsonLd helper classes in your plugin.

These classes can be used up until the point in which the components above are rendered in Winter CMS.

Meta tags

To add a Meta tag, use the following line:

where name is the name of the meta tag and value is the content of the meta tag.

You can also add several meta tags at once:

Note that only one value can be used per name. If the same name is used in a more recent call to the helper, the given value will overwrite any previous values.

Link tags

To add a Link tag, use the following line:

where name is the name of the link tag and value is the href of the link tag.

You can also add several link tags at once:

Note that only one value can be used per name. If the same name is used in a more recent call to the helper, the given value will overwrite any previous values.

JSON-LD blocks

To add a JSON-LD block, use the following line:

where name is the name of the JSON-LD block and value is the JSON-encoded content you wish to use in the block.

All provided values will be checked to ensure they are valid JSON - if a value provided is not valid JSON content, an ApplicationException will be thrown.

You can also add several JSON-LD blocks at once:


All versions of wn-meta-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.8
composer/installers Version ~1.0
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 bennothommo/wn-meta-plugin contains the following files

Loading the files please wait ....