New Community Post page
New Community Post page
The New Community Post page template is rendered when a user navigates to https://{yoursubdomain}.zendesk.com/hc/{locale}/community/posts/new
.
Available properties
You can use the following properties in the Article page template.
Name | Type | Description |
---|---|---|
promoted_articles | array | An array of promoted article objects |
ticket_forms | array | An array of ticket form objects |
help_center | object | A help_center object that holds information and settings about the current help center |
settings | object | A settings object with custom settings for the current theme |
signed_in | boolean | Whether the user is logged in or not |
featured_posts | array | An array of featured post objects |
brand | object | A brand object representing the current brand |
user | object | A user object representing the current user |
Available helpers
You can use the following helpers in this page template. You can also use any built-in helpers, global helpers, or global advanced helpers.
Name | Description |
---|---|
breadcrumbs | Breadcrumbs for the New Community Post page. See breadcrumbs helper |
Available forms
You can add the following form to the New Community Post page template:
Name | Description |
---|---|
post | A form to send a new post comment |
Use the form
helper to insert it. See Form Helper.
Available identifiers
The following identifiers are available in this page:
Identifier | Form | Field(s) | Description |
---|---|---|---|
title | post | label, input | Identifies a text field for the post title |
details | post | label, wysiwyg | Identifies a text field for the post body (use wysiwyg for rich content) |
topic | post | label, select | Identifies a drop-down to select a topic |
Example
<nav class="sub-nav">
{{breadcrumbs}}
{{search}}
</nav>
<h1 class="page-header">
{{t 'what_is_your_post_about'}}
</h1>
<div class="form">
{{#form 'post' class='new_community_post'}}
<div class="form-field {{#required 'title'}} required {{/required}}">
{{label 'title'}}
{{input 'title'}}
{{#validate 'title'}}
<div class="notification notification-error notification-inline">
{{error 'title'}}
</div>
{{/validate}}
</div>
{{suggestion_list class='searchbox'}}
<div class="form-field {{#required 'details'}} required {{/required}}">
{{label 'details'}}
{{wysiwyg 'details'}}
{{#validate 'details'}}
<div class="notification notification-error notification-inline">
{{error 'details'}}
</div>
{{/validate}}
</div>
<div class="form-field {{#required 'topic'}} required {{/required}}">
{{label 'topic'}}
{{select 'topic'}}
{{#validate 'topic'}}
<div class="notification notification-error notification-inline">
{{error 'topic'}}
</div>
{{/validate}}
</div>
<footer>{{input type='submit'}}</footer>
{{/form}}
</div>