Download the PHP package 4viewture/headless-menu without Composer

On this page you can find all versions of the php package 4viewture/headless-menu. 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 headless-menu

Headless Menu for TYPO3

This TYPO3 extension provides a JSON endpoint for generating menus. It is particularly useful for Webcomponents or headless frontend integrations where you need a slim, JSON-based representation of your page navigation.

Features

Installation

Install via composer:

Then, include the TypoScript template in your TYPO3 site configuration.

Usage

JSON Endpoint

The extension provides a new page type. You can access the menu JSON by appending type=1770960021 to your URL:

By default, the menu is only generated for the site's root page (site("rootPageId")) to prevent unnecessary cache entries for every single page.

This extension is compatible with TYPO3 v12, v13, and v14 as it uses modern TypoScript conditions.

Output example

With the standard configuration, the output will look like this:

TypoScript Configuration

The following TypoScript constants are available to customize the menu output:

Constant Default Value Description
lib.tx_headlessmenu.menu.level 7 How many levels deep the menu should be generated.
lib.tx_headlessmenu.menu.fields title,link,target,children Main fields to include for each menu item.
lib.tx_headlessmenu.menu.dataFields uid,slug,nav_title Specific fields from the raw record to include in the data section.
lib.tx_headlessmenu.menu.childrenKey children The key used for nesting child menu items.
lib.tx_headlessmenu.menu.header.allowOrigin (empty) Define Access-Control-Allow-Origin header.
lib.tx_headlessmenu.menu.page.typeNum 1770960021 The typeNum used for the JSON endpoint.

CORS Support

You can enable CORS by setting the lib.tx_headlessmenu.menu.header.allowOrigin constant. If set, it will also add Access-Control-Allow-Methods: GET, OPTIONS.

Data Processor

The extension includes a custom DataProcessor: FourViewture\HeadlessMenu\DataProcessing\WhitelistMenuFieldsProcessor.

It can be used in your own Fluid templates or TypoScript to filter menu arrays:

Authors

License

This project is licensed under the GPL-2.0+ License.


All versions of headless-menu with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^12.1 || ^13 || ^14
ext-json Version *
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 4viewture/headless-menu contains the following files

Loading the files please wait ...