Skip to content

Commit

Permalink
Adding documentation for the new webspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mamazu committed Mar 10, 2024
1 parent 6093d42 commit 17352c6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
5 changes: 3 additions & 2 deletions book/localization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Localizations for the content are configured in the webspaces, as already
described in :doc:`webspaces`. Adding another localization is as easy as
adding another ``localization`` tag to the webspace configuration file.
Localizations can also be nested, which has no impact on the representation in
all the dropdowns, but it will help the system to find better fallbacks.
all the dropdowns, but it will help the system to find better fallbacks. This
is why you can only nest them with a depth of 2.

So a good example using english and german as a language might look something
So a good example using English and German as a language might look something
like the following fragment.

.. code-block:: xml
Expand Down
26 changes: 20 additions & 6 deletions book/webspaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,31 @@ administration interface. Sulu allows you to create pages and sub pages in
these trees and fill them with content. Have a closer look at
:doc:`templates` for more details on the content management process.

Normally you'll create a webspace for a new website, a landingpage or a portal,
Normally you'll create a webspace for a new website, a landing page or a portal,
that should run on your Sulu instance.

The following file shows a configuration. These lines will be explained in the
To generate a blank webspace configuration file you can use the Symfony debug command:

.. code-block:: bash

Check warning on line 19 in book/webspaces.rst

View workflow job for this annotation

GitHub Actions / docs

Error in "code-block" directive:
bin/adminconsole config:dump-reference sulu_website --format xml
.. note::
All of the webspace definition files are located under `config/webspaces` and the default format is XML.

The following file shows an example configuration written in XML. These lines will be explained in the
following paragraphs.

.. code-block:: xml
<?xml version="1.0" encoding="utf-8"?>
<webspace xmlns="http://schemas.sulu.io/webspace/webspace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.sulu.io/webspace/webspace http://schemas.sulu.io/webspace/webspace-1.1.xsd">
<services:container xmlns="http://example.org/schema/dic/sulu_website"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:services="http://symfony.com/schema/dic/services"
xsi:schemaLocation="http://symfony.com/schema/dic/services
https://symfony.com/schema/dic/services/services-1.0.xsd"
>
<config>
<webspace>
<name>Example</name>
<key>example</key>
Expand Down Expand Up @@ -98,6 +110,8 @@ following paragraphs.
</portal>
</portals>
</webspace>
</config>
</services:container>
.. note::

Expand Down

0 comments on commit 17352c6

Please sign in to comment.