Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion manual/en/01-installation/configuring-the-live-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ You also need several PHP extensions to get the full functionality.
|---------------|-------------------------------|-----------|
| GDlib | image resizing | yes |
| DOM | XML files | yes |
| SOAP | Extension Repository | no |
| Phar | Live Update | no |
| mbstring | multi-byte character handling | no |
| mcrypt | data encryption | no |
Expand Down
112 changes: 112 additions & 0 deletions manual/en/02-folder-structure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Folder structure

Below, a representation of the folder structure of Contao and some files
commonly used.

```bash
├── app
│ ├── AppKernel.php
│ ├── cache
│ ├── config
│ └── logs
├── assets
├── files
├── system
│ ├── config
│ │ └── localconfig.php
│ └── modules
├── templates
├── vendor
│ ├── contao
│ └── symfony
└── web
├── .htaccess (hidden file)
├── app_dev.php
├── app.php
├── install.php
└── share
```

### app/

This is the application folder which includes especially Symfony cache files,
Symfony configuration files and log files.


### assets/

`assets/` contains components such as jQuery or TinyMCE. Contao CSS and JS
source files are also located in this folder as well as the combined and
minified CSS and JS files and resized images. It is available from the `web/`
folder through a symbolic link (See the [symbolic link chapter][1]).


### files/

`files/` contains public files such as images, CSS, JavaScript, etc. It is
available from the `web/` folder through a symbolic link.


### system/

`system/` contains Contao configuration files, the back end theme(s) and
[Contao modules][2].


### templates/

`templates/` contains customized templates. See the [template chapter][3].


### vendor/

This is the location of external libraries as well as the source code of Contao
and Symfony. This folder also includes Contao's [bundles][4] such as the
newsletter, the core, the news, etc. and bundles developed by the community.


### web/

This is the web root folder that contains public files, the
[front controllers][5] and the access to the Contao install tool.

`app.php` and `app_dev.php` are the front controllers. `app.php` is used in a
production environment and all the pages requested by visitors go through this
single entry point. `app_dev.php` has the same goal as `app.php` but for a
development environment. This mode displays a toolbar with some debugging
options.

`share/` contains shared files such as XML files (e.g. sitemaps or RSS feeds).

> **Warning** For security purpose, the `web/` folder should be the only one to
be accessible by visitors.


## Symbolic link

Public files (CSS, JavaScript, images, etc.) are only available from the `web/`
folder. If some folders must be publicly available and are located outside the
`web/` folder, the system generates [symbolic links][6] (also written symlink)
for each of them. For example, the `web/assets` folder is a reference that
targets the original folder `assets` placed at the same level as the `web/`
folder.

Public files of each bundle are located in the `web/bundles` folder through
symlinks. These can be regenerated from the back end under maintenance.


## Contao modules

Existing extensions developed for Contao 3.5 and lower can be used with Contao
4. But they must necessarily fulfil the compatibility requirements of Contao 4
to work properly. The procedure for installing an extension is described in the
chapter [extension][7].


[1]: #symbolic-link
[2]: #contao-modules
[3]: ../05-managing-content/templates.md
[4]: http://symfony.com/doc/current/glossary.html#term-bundle
[5]: https://en.wikipedia.org/wiki/Front_Controller_pattern
[6]: https://en.wikipedia.org/wiki/Symbolic_link
[7]: ../06-system-administration/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ Here's how to select the elements separately:
```


[1]: ../04-managing-content/articles.md#articles
[2]: ../03-managing-pages/modules.md#modules
[1]: ../05-managing-content/articles.md#articles
[2]: ../04-managing-pages/modules.md#modules
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ can assign the page layout(s) of the new theme in the site structure.


[1]: https://contao.org/en/contao-themes-and-templates.html
[2]: ../03-managing-pages/style-sheets.md#style-sheets
[3]: ../03-managing-pages/modules.md#modules
[4]: ../03-managing-pages/page-layouts.md#page-layouts
[2]: ../04-managing-pages/style-sheets.md#style-sheets
[3]: ../04-managing-pages/modules.md#modules
[4]: ../04-managing-pages/page-layouts.md#page-layouts
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ module, the newsletter would not be displayed.


[1]: http://en.wikipedia.org/wiki/Opt_in_e-mail
[2]: ../04-managing-content/insert-tags.md#insert-tags
[2]: ../05-managing-content/insert-tags.md#insert-tags
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function.
<?php $this->insert('template_name'); ?>
```

The `insert()` function also accepts the assignment of variables as second
The `insert()` function also accepts the assignment of variables as second
parameter.

```php
Expand Down Expand Up @@ -149,4 +149,4 @@ The output of the `image.html5` template will be:
```


[1]: ../03-managing-pages/themes.md#theme-components
[1]: ../04-managing-pages/themes.md#theme-components
58 changes: 0 additions & 58 deletions manual/en/05-system-administration/extensions.md

This file was deleted.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
78 changes: 78 additions & 0 deletions manual/en/06-system-administration/extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
## Extensions

Extensions are an essential part of Contao, because they allow you to add extra
functionality. There are more than 1,800 extensions available in the Contao
[Extension Repository][1].

Contao 4 is built on top of the Symfony framework and takes advantage of its
functionalities but also of its terminology. In a Symfony project, an extension
is named a bundle.

If a bundle and a Contao extension have the same purpose, they are nevertheless
not developed in the same way and the installation procedure is different for
each of them.

> **Warning** Even if a Contao extension can be installed, this does not mean
that it is compatible with Contao 4. The extension you want to use must take
into account the prerequisites of the version 4.


### Installing a Contao extension

With Contao 4.0, the installation must be performed manually as described below:

Find the extension you want to install in the [extension list][1] and download
the .zip archive of the latest release. Then unzip the files and copy them to
the `system/modules` folder. If the extension has public files, you must
generate a [symbolic link][2] with the command `app/console contao:symlinks` in your
command-line interface. Then you must register your extension in
`app/AppKernel.php` so that it can be taken into account by the system (see
below). Finally, check the database with the [Contao install tool][3].


#### AppKernel.php

1. Add the `use` statement.

```php
use Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle;
```

2. Instantiate the `ContaoModuleBundle` class. The first parameter is the name
of your extension.

```php
new ContaoModuleBundle('myExtensionName', $this->getRootDir()),
```

**Example**:

```php
// app/AppKernel.php
use Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle;

public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Contao\CoreBundle\ContaoCoreBundle(),
new ContaoModuleBundle('myExtensionName', $this->getRootDir()),
];

// ...

return $bundles;
}
```


## Extension catalog

Prior to Contao 4, it was possible to install an extension automatically from
the back end. This feature is under development and will be offered in a future
release.


[1]: https://contao.org/en/extension-list.html
[2]: ../02-folder-structure/README.md#symbolic-link
[3]: ../01-installation/installing-contao.md#the-contao-install-tool
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ to see protected pages or access protected downloads that are not available to
guests.


[1]: ../03-managing-pages/modules.md#access-control
[1]: ../04-managing-pages/modules.md#access-control
53 changes: 27 additions & 26 deletions manual/en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,30 @@
* [Live Update Service](01-installation/live-update-service.md)
* [Moving an installation](01-installation/moving-an-installation.md)
* [Configuring the live server](01-installation/configuring-the-live-server.md)
* [Administration area](02-administration-area/README.md)
* [Listing records](02-administration-area/listing-records.md)
* [Editing records](02-administration-area/editing-records.md)
* [Keyboard shortcuts](02-administration-area/keyboard-shortcuts.md)
* [Managing pages](03-managing-pages/README.md)
* [Components](03-managing-pages/components.md)
* [Themes](03-managing-pages/themes.md)
* [Style sheets](03-managing-pages/style-sheets.md)
* [Modules](03-managing-pages/modules.md)
* [Page layouts](03-managing-pages/page-layouts.md)
* [Page types](03-managing-pages/page-types.md)
* [Managing content](04-managing-content/README.md)
* [Articles](04-managing-content/articles.md)
* [News items](04-managing-content/news-items.md)
* [Events](04-managing-content/events.md)
* [RSS/Atom feed](04-managing-content/rss-atom-feed.md)
* [Newsletters](04-managing-content/newsletters.md)
* [Forms](04-managing-content/forms.md)
* [Comments](04-managing-content/comments.md)
* [Templates](04-managing-content/templates.md)
* [Markdown](04-managing-content/markdown.md)
* [Insert tags](04-managing-content/insert-tags.md)
* [System administration](05-system-administration/README.md)
* [Users and groups](05-system-administration/users-and-groups.md)
* [Extensions](05-system-administration/extensions.md)
* [Maintenance](05-system-administration/maintenance.md)
* [Folder structure](02-folder-structure/README.md)
* [Administration area](03-administration-area/README.md)
* [Listing records](03-administration-area/listing-records.md)
* [Editing records](03-administration-area/editing-records.md)
* [Keyboard shortcuts](03-administration-area/keyboard-shortcuts.md)
* [Managing pages](04-managing-pages/README.md)
* [Components](04-managing-pages/components.md)
* [Themes](04-managing-pages/themes.md)
* [Style sheets](04-managing-pages/style-sheets.md)
* [Modules](04-managing-pages/modules.md)
* [Page layouts](04-managing-pages/page-layouts.md)
* [Page types](04-managing-pages/page-types.md)
* [Managing content](05-managing-content/README.md)
* [Articles](05-managing-content/articles.md)
* [News items](05-managing-content/news-items.md)
* [Events](05-managing-content/events.md)
* [RSS/Atom feed](05-managing-content/rss-atom-feed.md)
* [Newsletters](05-managing-content/newsletters.md)
* [Forms](05-managing-content/forms.md)
* [Comments](05-managing-content/comments.md)
* [Templates](05-managing-content/templates.md)
* [Markdown](05-managing-content/markdown.md)
* [Insert tags](05-managing-content/insert-tags.md)
* [System administration](06-system-administration/README.md)
* [Users and groups](06-system-administration/users-and-groups.md)
* [Extensions](06-system-administration/extensions.md)
* [Maintenance](06-system-administration/maintenance.md)