The development of a website can be approached in several ways. Standard websites usually consist of HTML documents, which contain texts and have image files, video files, styles, etc. referenced. The enterprise content management system TYPO3 features a clean separation between design, content and functionality of a website and allows developers/integrators to add simple as well as sophisticated functions to the system easily.
By building the sitepackage as an extension, all relevant files are stored at a central point and changes can easily be tracked in a version control system such as Git. Despite the fact that TYPO3 supports several methods of implementing websites, this approach is a very flexible and professional way. At the same time the process is not overly complicated.
Another important benefit of a TYPO3 extension is the fact that dependencies to other extensions and/or the TYPO3 version can be defined. This makes deployments easier and more fail-safe. This feature is called “Dependency Management”. Most TYPO3 sites require a number of extensions. This could be “News”, “Powermail” or “RealURL” for example. By building a sitepackage extension, which may contain global configuration for these add-ons, the dependencies can be defined. When the sitepackage extension is installed in an empty TYPO3 instance, all dependent extensions are downloaded from the TYPO3 Extension Repository and installed automatically.
Clean Separation from the Userspace¶
Without using an extension, template files are often stored in the
fileadmin/ directory of a TYPO3 instance. As a matter of fact, files in
this directory are indexed by TYPO3’s File Abstraction Layer (FAL). This
results in irrelevant and avoidable records in the database. From a logical
fileadmin/ area is the “userspace”. This area is meant to
belong to editors. Even if access permissions restrict editors from accessing
or manipulating files in
fileadmin/, site configuration components should
not be stored in the userspace by all means.
fileadmin/ are typically meant to be publicly accessible per
convention. To avoid disclosing sensitive system information (see the
TYPO3 Security Guide for further details),
configuration files should not be stored in
Modern versions of TYPO3 CMS follow the convention over configuration paradigm. As a consequence, if files and directories of the sitepackage extension use a specific naming convention, they are loaded automatically as soon as the extension is installed/activated in the system. This leads to another important advantage of the sitepackage extension. The extension can be deployed easily by using the Extension Manager and/or the PHP composer method. This also enables system administrators to automate the deployment for example.
In virtue of the motto “TYPO3 inspires people to share!”, the sitepackage extension can also be shared with the community via the official TYPO3 Extension Repository and/or in a publicly accessible version control system such as GitHub.
Last, but not least, configuration implemented in the sitepackage can be overwritten in the TypoScript setup and constants as required.
This TYPO3 tutorial assumes that the reader has some basic knowledge in the following areas:
- SSH/FTP (copy files and directories to and from the server)
It is also recommended that the reader has worked with TYPO3 before, knows what the frontend, backend and Extension Manager is and how to access the Install Tool. Missing knowledge can be acquired by working through the TYPO3 documentation, for example the Getting Started Tutorial.
Due to the fact that the sitepackage discussed in the next chapters implements a new, fresh, clean website skin from scratch, an empty TYPO3 instance is a prerequisite, too. This means, we assume we have a TYPO3 site without any pages, any design templates, any configuration, etc. However, a valid TYPO3 backend user with administrator privileges is required and SSH/FTP access to the server is recommended.