diff --git a/book/index.rst b/book/index.rst index 595a523e..ac9efc9c 100644 --- a/book/index.rst +++ b/book/index.rst @@ -19,7 +19,6 @@ Be sure to know a thing or two about `Symfony`_. Sulu is based on Symfony and st image-formats localization smart-content - themes extend-admin Lots of fun with Sulu. We hope you'll find the love we put in it while creating it. diff --git a/book/themes.rst b/book/themes.rst deleted file mode 100644 index 82db1f69..00000000 --- a/book/themes.rst +++ /dev/null @@ -1,90 +0,0 @@ -Adding a theme -============== - -In the theme we'll define how things look to the user. You know HTML, CSS, JS -and such stuff. - - -What is a theme ---------------- - -A theme defines the way the content from Sulu is presented on the website. In -general it's not more than a simple folder containing all the required twig -templates, images, scripts, fonts and all the other assets you want to use in -this specific theme. - -You can have multiple themes in one Sulu installation. Every webspace can -decide which theme to use, by a simple key in the webspace configuration file -already described in :doc:`webspaces`. This means that it is also very -easy to switch between different themes. - -This feature is not shipped with a minimal sulu-installation. But can be easily -integrated. - -Installation ------------- - -First add the dependency to the `SuluThemeBundle`_ in your `composer.json` file. - -.. code-block:: xml - - composer require sulu/theme-bundle - -To enable it add the following line into the `config/bundles.php` file: - -.. code-block:: xml - - return [ - ... - - Sulu\Bundle\ThemeBundle\SuluThemeBundle::class => ['all' => true], - ]; - -Add the following configuration in the file `config/packages/liip_theme.yaml`, which you have to create on your own: - -.. code-block:: yaml - - # LIIP Theme Configuration - liip_theme: - themes: ["default"] - active_theme: "default" - load_controllers: false - path_patterns: - app_resource: - - '%kernel.project_dir%/templates/themes/%%current_theme%%/%%template%%' - -This will configure a default theme which can be enabled in the -`config/webspaces/.xml` file by adding: - -.. code-block:: xml - - default - -Create a theme --------------- - -To create a theme you have to create a new folder in the `templates/themes` -folder of your application with the name of the new theme. Afterwards you have -to fill this folder with all the used templates in the webspace. These templates -go into another subfolder in your theme, which you have to reference later. - -For more concrete information about the structure of these templates you should -check the :doc:`templates`. - - -Enable the theme ----------------- - -For resolving the templates we are using the `LiipThemeBundle`_, which requires -you to register your themes. You can do that in your LiipThemeBundle -configuration located at `config/packages/liip_theme.yml`. Add the name of your -theme folder to the following list: - -.. code-block:: yaml - - liip_theme: - themes: ["default", "your-new-shiny-theme"] - -.. _LiipThemeBundle: https://github.com/liip/LiipThemeBundle -.. _`Theme cascading order`: https://github.com/liip/LiipThemeBundle#theme-cascading-order -.. _SuluThemeBundle: https://github.com/sulu/SuluThemeBundle diff --git a/book/webspaces.rst b/book/webspaces.rst index 7a5c3dd4..08c5f8a9 100644 --- a/book/webspaces.rst +++ b/book/webspaces.rst @@ -118,10 +118,10 @@ Themes (optional) ----------------- The ``theme`` is described by a key. This key leads to a certain theme, -implemented by a developer in the system. Read more about themes in the section -:doc:`themes`. This feature is default deactivated and therefore in the -example not used. If you have multiple webspaces which should look different, -you can use this feature to do this. +implemented by a developer in the system. If you use multiple webspaces, +which should have a different look and feel, you can easily accomplish +this with the `SuluThemeBundle`_. Read more about the installation and usage +in the `bundle documentation`_. Templates --------- @@ -245,3 +245,6 @@ the values of them by using the ``de-at``-localization: Now you got your webspace ready, we will create a template for a page that could be added to the webspace. + +.. _SuluThemeBundle: https://github.com/sulu/SuluThemeBundle +.. _bundle documentation: https://github.com/sulu/SuluThemeBundle/blob/master/README.md diff --git a/developer/bc-promise.rst b/developer/bc-promise.rst index 714ad72c..e5c13eaa 100644 --- a/developer/bc-promise.rst +++ b/developer/bc-promise.rst @@ -5,7 +5,7 @@ Sulu is a stable software used in production. It is however still under heavy development and therefore a full backwards compatibility can not be guaranteed at the current stage. -We are do our best to keep backwards compatibility for the most used extension +We do our best to keep backwards compatibility for the most used extension points and services of Sulu. These are listed in this document. The promises given in this document are only valid during a single major @@ -33,7 +33,7 @@ backwards compatibility is promised: * Webspace (see :doc:`../book/webspaces`) * Template (see :doc:`../book/templates`) -* Image formats (see :doc:`../book/themes`) +* Image formats (see :doc:`../book/image-formats`) * MassiveSearch (see the `MassiveSearchBundle Mapping`_) * Bundle configurations