You can define a specific type of content to be used by the "Content proposal" service (e.g. classified ads, job offers, etc.).

Follow the settings and integration manual to learn more about content type creation.

The "Content proposal" service automatically generates a form with the fields for the type of content chosen.

The generated form does not currently support all field types.
Repeater fields, geocode fields and multiple non-string fields are not supported.

When content is created via the "Content proposal" service, it is automatically assigned the mixin (role) "org.ametys.plugins.ugc.Mixin". This provides contact information: name and mail of the person submitting the content:

  • ugc-contact/name
  • ugc-content/mail

In the submission form, these fields are only visible in anonymous mode. Otherwise, they are automatically filled in and hidden with the name/email of the logged-in user.

Contact information
Don't add "Name" and "Email" fields to your UGC content, even if you want to display them in the rendering of the proposed content. Use the fields provided by mixin.
In content rendering, you can retrieve them this way:
<xsl:variable name="contactName" select="ametys:contentAttribute(/view/content/@id, 'ugc-contact/name')"/>
<xsl:variable name="contactMail" select="ametys:contentAttribute(/view/content/@id, 'ugc-contact/mail')"/>

Back to top

UGC