Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding documentation for the new webspaces #790

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
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
30 changes: 24 additions & 6 deletions book/webspaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,35 @@
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 make working with configuration files easier Symfony Config provides some handy commands:

.. 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:
# Creating a new webspace configuring template
bin/adminconsole config:dump-reference sulu_website --format xml

# Debugging the configuration
bin/adminconsole debug:config: sulu_website
mamazu marked this conversation as resolved.
Show resolved Hide resolved

.. 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 +114,8 @@
</portal>
</portals>
</webspace>
</config>
</services:container>

.. note::

Expand Down
Loading