Quick Start 

This guide provides a comprehensive overview for getting the Anthology extension running, assuming you have an existing TYPO3 model you wish to display.

Installation 

Install the extension via Composer:

composer require liquidlight/typo3-anthology
Copied!

Add Anthology to your site set as a dependency by either selecting it in the Sites module or adding the following to your site config YAML:

dependencies:
  - liquidlight/anthology
Copied!

If you're not using site sets, you can include the TypoScript in your setup.typoscript file:

@import 'EXT:ll_anthology/Configuration/TypoScript/setup'
Copied!

Automated Setup 

The quickest and easiest way to get started with Anthology is using the anthology:setup command:

Run the Command 

./vendor/bin/typo3 anthology:setup [site_package_path]
Copied!

Replace [site_package_path] with the path to either your site package, or the extension you are modifying.

Once the command has completed, it is recommended you manually review the generated configuration for accuracy before proceeding.

Add the Generated Configuration 

If it is not already configured, you must include the generated sitemap.typoscript and [model_name].typoscript files in your site package or extension's TypoScript file:

@import './TypoScript/modules'
Copied!

And also add the generated YAML configuration to your site configuration YAML:

imports:
  - resource: 'EXT:site_package/Configuration/Sites/[ModelName].yaml'
Copied!

Manual Setup 

Repository Configuration 

For the extension to function, you must add the AsAnthologyRepository attribute to your model's repository.

use LiquidLight\Anthology\Attribute\AsAnthologyRepository;
use TYPO3\CMS\Extbase\Persistence\Repository;

#[AsAnthologyRepository('tx_myextension_domain_model_item')]
class ItemRepository extends Repository {
	...
}
Copied!
  • AsAnthologyRepository's tableName argument must be the name of your database table and TCA.

Add and Configure the Plugin 

  1. Navigate to the Page module and add the Anthology content element from the Plugins tab.
  2. Configure the plugin settings:
General Tab
  • Mode: Choose List for the main view or Single for a detail page.
  • Model name: Select your model (e.g., "My Extension Items"). This list is populated based on your TypoScript configuration.
  • Single View Page: For a List plugin, link to the page where the Single view is located.
Display Tab
  • Items Per Page: Set the number of items for pagination (e.g., 10).
  • Enable Pagination: Activate or deactivate the pagination.
Filters Tab
  • Assign pre-configured filter records to the plugin.

Routing (for Detail Pages) 

To create user-friendly URLs for your detail pages, add a route enhancer to your site's config.yaml:

routeEnhancers:
  # Single view with slug-based URLs
  ItemSingle:
  type: Extbase
  limitToPages:
    - 123  # Your single view page UID
  extension: LlAnthology
  plugin: AnthologyView
  routes:
    # Single record by slug
    - routePath: '/{record}'
    _controller: 'Anthology::single'
  defaultController: 'Anthology::view'
  aspects:
    record:
    type: PersistedAliasMapper
    tableName: tx_myextension_domain_model_item
    routeFieldName: slug
Copied!

This requires a slug field in your model's table.

For further information, and to add pagination route enhancers to the list view, refer to the Routing documentation.

Sitemap 

To include your detail pages in the XML sitemap, add a sitemap provider to your TypoScript:

plugin.tx_seo.config.xmlSitemap.sitemaps {
	my_items {
		provider = TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider
		config {
			table = tx_myextension_domain_model_item
			sortField = crdate
			lastModifiedField = tstamp
			pid = 123  # Storage page UID
			url {
				pageId = 456  # Single view page UID
				fieldToParameterMap {
					uid = tx_llanthology_anthologyview[record]
				}
				additionalGetParameters {
					tx_llanthology_anthologyview.action = single
					tx_llanthology_anthologyview.controller = Anthology
				}
			}
		}
	}
}
Copied!

See the Sitemap guide for more details.

Templates 

The extension will automatically use templates from your model's extension directory. To override a template, copy it from ll_anthology/Resources/Private/ to the corresponding path in your own extension (e.g., my_extension/Resources/Private/Partials/List/Record.html) and modify it.