Download the PHP package heimrichhannot/contao-head-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-head-bundle. 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 contao-head-bundle

Contao Head bundle

This bundle enhances the handling of html <head> section tags. It provides services to update head tags dynamically from your code.

Features

Usage

Setup

  1. Install with composer
  2. Update your database
  3. Set following config variables (if you don't need the legacy implementation)

  4. Optional: Set fallback image and twitter author in root page(s)

Add additional meta tags

In your root page, you can activate to add fallback image (og:image and twitter:image) and twitter username (twitter:site) meta tags to you web page.

Add additional schema.org data

In your root page, you can activate to add additional structured data to you web page. Following schema.org types are available:

Set json-ld in your templates

This bundle backports the methods of contao 4.12+ to contao 4.9+. So usage is the same as in the contao core.

Twig templates

PHP templates

Integration

Use head bundle api set in your code.

Set head content

To set base, title, meta and link tags, use the HtmlHeadTagManager service:

Set json-ld schema data

From contao 4.12 you can use the JsonLdManager service from the core.

To set json-ld schema data, use the JsonLdManager service:

Reader Config Contao sample

image

Legacy integration

Be sure, huh_head.use_contao_head and/or huh_head.use_contao_variables are not set to true.

Output $this->meta() in your fe_page template ()

Make sure, that you remove (are outputted by $this->meta() if huh_head.use_contao_head is not true):

The meta function accepts currently one parameter that can contain service names (array) that should be skipped.

Developers

Backend field

Get tag options for a select field. If you want to define options by your own, prepend meta tag options with meta_.

Example how to evaluate field values:

Config reference


All versions of contao-head-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
contao/core-bundle Version ^4.9
heimrichhannot/contao-utils-bundle Version ^2.219
psr/container Version ^1.0 || ^2.0
spatie/schema-org Version ^3.4
symfony/config Version ^4.4 || ^5.4
symfony/dependency-injection Version ^4.4 || ^5.4
symfony/http-kernel Version ^4.4 || ^5.4
symfony/service-contracts Version ^1.0 || ^2.0 || ^3.0
symfony/polyfill-php80 Version ^1.26
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 heimrichhannot/contao-head-bundle contains the following files

Loading the files please wait ....