Download the PHP package hauerheinrich/hh-ext-faqs without Composer

On this page you can find all versions of the php package hauerheinrich/hh-ext-faqs. 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 hh-ext-faqs

hh_ext_faqs – FAQ extension for TYPO3 v13

Accessible FAQ lists (native <details>/<summary> accordion) with an optional client-side live search and upgrade wizards to migrate from EXT:jpfaq (manual steps necessary!).

Features

Installation

  1. composer require hauerheinrich/hh-ext-faqs (or copy to packages/ and install)
  2. Enable the frontend rendering per site / root tree (opt-in!):
    • Site-set based sites: add the FAQ set (hauerheinrich/hh-ext-faqs) as dependency in the site configuration (dependencies: [hauerheinrich/hh-ext-faqs] in config.yaml or via the Sites module), or
    • classic sys_template based trees: add the static include FAQ (hh_ext_faqs) in the root template of the tree ("Include static (from extensions)").
  3. Create a folder, add FAQ records, place the FAQ: List plugin.
  4. Optionally place the FAQ: Search plugin above the list(s) and select the lists it should filter.

Multi-domain / opt-in rendering

configurePlugin() with PLUGIN_TYPE_CONTENT_ELEMENT normally registers global rendering TypoScript for all sites. This extension deliberately removes that global definition again (see ext_localconf.php) and ships the rendering in Configuration/TypoScript/setup.typoscript instead, loaded only via the site set or the static include. Result:

The backend (TCA) is always global in TYPO3. To also hide the content elements from editors in trees that should not use them, add this to the page TSconfig of the affected root page:

Note for migrations: trees containing migrated jpfaq plugins need the set or static include as well, otherwise the migrated elements stay invisible in the frontend.

Extending the FAQ plugins

Both plugins store their settings in regular tt_content columns instead of FlexForms. This means you can extend them from your own extension using standard TYPO3 APIs only — no XCLASSing, no FlexForm manipulation.

Extending a plugin consists of up to three steps:

  1. Add your own tt_content column and place it in the plugin form (TCA)
  2. Render the value by overriding a Fluid template/partial
  3. Optional: prepare complex data (e.g. FAL references) via a PSR-14 event

Prerequisites: declare the dependency

TCA override files (Configuration/TCA/Overrides/*.php) are executed in extension loading order. Your extension must be loaded after hh_ext_faqs, otherwise the plugin types do not exist yet when your code runs and calls like addToAllTCAtypes() will silently do nothing.

Declare the dependency in your composer.json:

or, in classic mode, in your ext_emconf.php:

Step 1: Add your own field

Use your own vendor prefix for the column name (tx_yourext_*). The tx_hhextfaqs_* namespace is reserved for this extension.

Configuration/TCA/Overrides/tt_content.php of your extension:

Add the column to your ext_tables.sql (optional on TYPO3 v13, where the schema is derived from TCA automatically):

Then run Admin Tools → Maintenance → Analyze Database Structure and flush all caches.

Step 2: Render the value (template override)

All plugin templates receive the full tt_content row of the content element as the Fluid variable {data}. Scalar values (text, selects, checkboxes) therefore need no PHP at all — override the template or partial and access your column directly:

Prefer overriding a single partial over copying the whole template — this keeps your override compatible with future updates of this extension.

Step 3: Prepare complex data with the PSR-14 event

Values that need processing before rendering — FAL references, relations, computed values — can be added through an event that is dispatched right before the view is rendered:

Event Dispatched in
HauerHeinrich\HhExtFaqs\Event\ModifySearchVariablesEvent SearchController::searchAction()
HauerHeinrich\HhExtFaqs\Event\ModifyListVariablesEvent ListController::listAction()

Both events provide the same API:

Method Description
getVariables(): array All variables that will be assigned to the view
addVariable(string $key, mixed $value): void Add or replace a single view variable
getContentElementData(): array The full tt_content row of the current content element (read-only)

Example: resolve a FAL image and pass it to the template

Classes/EventListener/AddBackgroundImageToSearch.php in your extension:

The #[AsEventListener] attribute registers the listener automatically (TYPO3 v12.3+). Alternatively, register it in your Configuration/Services.yaml:

In your overridden template/partial the variable is then available like any other view variable:

After adding a listener, flush all caches once (dependency injection information is cached).

Migration from EXT:jpfaq

Run the wizards in the Upgrade module (or via CLI) in this order:

  1. Migrate jpfaq records to hh_ext_faqs (hhExtFaqs_jpfaqRecordMigration)
    • jpfaq categories → sys_category below a new root category "FAQ Categories"
    • jpfaq questions → tx_hhextfaqs_domain_model_faq (pid, sorting, hidden, start/end time, translations are kept)
    • question/category relations → sys_category_record_mm
    • The uid mapping is stored in sys_registry (namespace tx_hhextfaqs) and is reused by the plugin wizard.
  2. Migrate jpfaq plugins to hh_ext_faqs (hhExtFaqs_jpfaqPluginMigration)
    • tt_content elements with CType=hhextfaqs_faq (or the legacy list_type=jpfaq_faq) become CType=hhextfaqs_list
    • FlexForm settings.startingpoint → pages field
    • FlexForm settings.flexform.selectCategory → settings.categories (mapped to the new sys_category uids)

Both wizards are idempotent and repeatable; already migrated records are skipped.

Deliberately not migrated

Notes


All versions of hh-ext-faqs with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^13.4
typo3/cms-extbase Version ^13.4
typo3/cms-fluid Version ^13.4
typo3/cms-fluid-styled-content Version ^13.4
typo3/cms-frontend Version ^13.4
typo3/cms-install Version ^13.4
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 hauerheinrich/hh-ext-faqs contains the following files

Loading the files please wait ...