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

Enhance your website's SEO and social media presence with more meta- and structured data.

Features

Usage

Setup

  1. Install with composer
  2. Update your database
  3. 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 X/Twitter username (twitter:site) meta tags to you web page.

Add additional schema.org data

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

Add (meta-)tags from template (twig)

The bundle provides Twig functions to add head tags from Twig templates:

Function Description
add_head_tag(name, value) Add all kinds of head tag. Meta tag names must be prefixed with meta_, for example meta_description or meta_og:title.
add_head_meta_tag(name, value) Shorthand for meta tags. The function adds the meta_ prefix automatically.
add_head_tags(array) Add multiple tags at once. Pass as key => value or a AbstractHeadTag object. Meta tags must be prefixed with meta when passed as key.
get_head_news_tags(model, figure) Create an array of tags for news models. The function automatically adds og:title, og:description, og:url and og:image tags. Pass a figure to override default news article image.

The value argument can be a string, null or a Contao Figure. If a Figure is passed, its image source is used as the tag content.

Integration

Use head bundle api set in your code.

Set head content

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

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:


All versions of contao-head-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
contao/core-bundle Version ^5.3
heimrichhannot/contao-utils-bundle Version ^3.0
psr/container Version ^1.0 || ^2.0
spatie/schema-org Version ^3.4
symfony/config Version ^6.4 || ^7.0
symfony/dependency-injection Version ^6.4 || ^7.0
symfony/http-kernel Version ^6.4 || ^7.0
symfony/service-contracts Version ^1.0 || ^2.0 || ^3.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 heimrichhannot/contao-head-bundle contains the following files

Loading the files please wait ...