Download the PHP package b13/headertypes without Composer

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

CI

EXT:headertypes - Separate the semantic header type from the header layout

Features

Why did we create this extension?

TYPO3 Core ships a single header_layout field for content headers. That one field is used for two very different things at once: it decides both how a header looks and which HTML tag is rendered (<h1> … <h6>).

In real projects those two concerns pull apart:

EXT:headertypes solves this by splitting the concern in two:

This lets editors pick, for example, "looks like a Layout 2 heading, but is semantically an <h1>" — cleanly and without templating hacks.

Installation

Install this extension via composer req b13/headertypes or download it from the TYPO3 Extension Repository and activate the extension in the Extension Manager of your TYPO3 installation.

How it works

The extension adds two select fields to the tt_content table:

Field Purpose Values
tx_headertypes_headertype Semantic tag of the header 0 = Default, 1–6 = h1–h6, 7 = p, 8 = span
tx_headertypes_subheadertype Semantic tag of the subheader 0 = Default, 1–6 = h1–h6, 7 = p, 8 = span

Both fields are added to the Core header and headers palettes, so they appear directly next to the header input in the backend for every content element that uses those palettes. The value 0 ("Default") means "do not override" — your template should fall back to its normal header rendering in that case.

The extension does not render anything in the frontend on its own. Rendering the chosen tag is the job of your site package or theme, which keeps the extension unopinionated and compatible across TYPO3 versions.

Frontend rendering

To make the new fields take effect, override the header partial in your site package (for fluid_styled_content this is Resources/Private/Partials/Header/Header.html) and use tx_headertypes_headertype to choose the tag, while keeping header_layout for the visual class.

The same principle applies to the subheader via {data.tx_headertypes_subheadertype}.

Compatibility

Extension version TYPO3 versions
1.x v12.4, v13, v14

Credits

This extension was created by David Steeb in 2020 for b13 GmbH, Stuttgart.

Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.


All versions of headertypes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
typo3/cms-core Version ^12.4 || ^13.0 || ^14.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 b13/headertypes contains the following files

Loading the files please wait ...