Tutorial

This tutorial will show you how you can use the TYPO3 Beaconizer to create a BEACON file out of your TYPO3 pages and how to enhance the content with seeAlso links. We will use the most easy setup with regular TYPO3 pages. Using the Beaconizer with extbase records follows the same principles explained in this tutorial.

Here the scenario: our TYPO3 website contains some biographies of some famous poets: William Shakespeare, Franz Kafka and James Joyce. The biographies are just regular TYPO3 pages with content elements. Since there are many sites on the web that contain information about our poets we want to achieve two things:

  • Share the links to our biographies with the outside world in a machine readable format
  • Enhance our biographies with links to other sources about each poet so that our users can get more information when they read our content

We have the following page tree:

Our example page tree

So there is a page for each poet below the “Pages” folder that contains each biography. The first thing we need to do is to get an identifier for each poet from an authority file. In our case we will be using the identifiers from the German national library. Identifiers for persons can be looked up using the regular search form on the libraries website. Here are the three identifiers we need:

The TYPO3 Beaconizer inserts a new field source_identifier in the page properties that can be used to enter an authority file identifier for each page.

Identifier field in the page properties

Please note that we not only enter the identifier for each poet but also equip the alias field of each page with a prefixed version of each identifier. By doing this we create automatic redirects to each biographiy page just with plain TYPO3 standard functionality (the field needs to be prefixed with letters since it should not contain numbers only - that could theoretically lead to an uid/alias conflict.

So from now on each of our biography pages can be reached with a direct link:

We are now ready to generate a BEACON file out of these pages that will communicate those links to the outside world.

Generate a BEACON file out of TYPO3 pages

After having included the static TypoScript of the TYPO3 Beaconizer in our root template we insert a plugin on the “Generator > Pages” page. It is of the type “Beaconizer: Generator”. We leave the PREFIX and the RELATION fields at their default values. For the TARGET field we create a pattern out of the link alias combination from above that can be used by external applications to dynamically compose links to our pages with the biographies:

http://example.org/index.php?id=gnd_{ID}

Then we select the parent page of our biography pages as record storage page in the plugin. Finally we need to map the pages table and its source_identifier field to the sourceIdentifier field of the Generated Link class of the Beaconizer extension.

plugin.tx_beaconizer_generator {
  persistence {
    classes {
      ADWLM\Beaconizer\Domain\Model\GeneratedLinks {
        mapping {
          tableName = pages
          columns {
            source_identifier.mapOnProperty = sourceIdentifier
          }
        }
      }
    }
  }
}

That’s it. When we now open the page with the BEACON-Generator plugin a text file will be displayed containing the information from the plugin and the three identifiers from the pages table. This file could now be registered with a BEACON service and evaluated by other applications.

Identifier field in the page properties