Message-ID: <2066813876.2866.1485851052583.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2865_1984031089.1485851052583" ------=_Part_2865_1984031089.1485851052583 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html User Generated Content

User Generated Content

=20
=20
=20
=20

Introduction

Content Edit

V1.2=

eZ Platform comes with content edition features via the Symfony stack. T= hey are meant, in addition the PlatformUI's editing capabilities, to allow = the implementation of User Generated Content from the frontend.

Usage

Crea= ting a content item without using a draft

As of eZ Platform 1.2, a new /content/edit/nodraft rou= te is available. It will show a Content item creation form for a given Cont= ent Type:

argument type description
contentTypeIdentifier string The identifier of the content type to create. Ex= ample: folder, article
languageCode string Language code the content item mus= t be created in. Example: eng-GB
parentLocationId integer ID of the Location the content ite= m must be created in. Example: 2

For now a very limited subset of Field Types is supported. These are:

  • V1.2 TextLine and TextBlock
  • V1.4 Selection, Checkbox and User

More will be added in the near future.

Registering new users

V1.4=

You can allow your users to create accounts by employing the /regi= ster route. This route leads to a registration form that, when fille= d in, creates a new User Content item in the repository.

User Groups

By default, new Users generated in this way are placed in the Guest acco= unts group. You can select a different default group in the following = section of configuration:

=20
ezpublish:
    system:
        default:
            user_registration:
                group_id: <userGroupContentId>
=20

Registration form= templates

You can use custom templates for the registration form and for the regis= tration confirmation page.

These templates are defined with the following configuration:

=20
ezpublish:
    system:
        default:
            user_registration:
                templates:
                    form: 'user/registration_form.html.twig'
                    confirmation: 'user/registration_confirmation.html.twig=
'
=20

with the following templates in app/Resources= /views/user/registration_form.html.twig:

=20
{% extends noLayout is defined and noLayout =3D=3D true ? viewbaseL=
ayout : pagelayout %}
{% block content %}
     {% import "EzSystemsRepositoryFormsBundle:Content:content_form.html.tw=
ig" as contentForms %}
    =20
     <section class=3D"ez-content-edit">
         {{ contentForms.display_form(form) }}
     </section>
{% endblock %}
=20

and in app/Resources/views/user/registration_= confirmation.html.twig:

=20
{% extends noLayout is defined and noLayout =3D=3D true ? viewbaseL=
ayout : pagelayout %}
{% block content %}
    <h1>Your account has been created</h1>
    <p class=3D"user-register-confirmation-message">
        Thank you for registering an account. You can now <a href=3D"{{ =
path('login') }}">login</a>.
    </p>
{% endblock %}
=20

 

Repository Forms

This package provides form-based interaction for the Repository Value ob= jects.

It is currently used by:

  • ezsystems/platform-ui-bundle for most management inte= rfaces: Sections, Content Types, Roles, Policies, etc.
  • ezsystems/ezpublish-kernel for user registration, and= user generated content
=20
=20
=20
=20

In this topic:

=20
=20
=20
------=_Part_2865_1984031089.1485851052583--