Skip to content
Sugester Help

List of available Handlebars variables

Updated at: Number of views: 3300 6 min read

Sugester lets you use a number of Handlebars variables to modify the looks and functionality of your forum/knowledge base. See below to read the full list of available variables. title: Title forum_name: Forum name forum_description: Forum description forum_logo_url: URL of forum logo path: Path full_path: Full path forum_url: Forum URL forum_path: Forum path forum_feedback: Is this a feedback forum (true/false) forum_help: Is this a knowledge base (true/false) tags: Tags available on this forum/knowledge base help_abstract: Knowledge base post summary help_content:  Knowledge base post content owner: Is current user the forum/kb owner (true/false) newest: 10 newest forum posts       title: Post title       url: Post URL       abstract: Post summary popular: 10 most popular forum posts       title: Post title       url: Post URL       abstract: Post summary tags: Tags available on this forum/kb       tag_name: Tag name       tag_link: Link to this tag categories: Categories on this forum/kb       id: Category ID       name: Category name       link: Link to category       count: Number of posts in category       icon: Category icon       description: Category description       pages: Pages with posts (returns table with 10 posts/page by default)       new_post_link: Link to new post creation       edit_category_link: Link to category editing dialog       overcategory: Parent category           name: Parent category name       link: category_url (category.category)       top_posts: 10 most popular posts in category       posts: posts from current page (up to 10)       subcategory: Subcategories        active_users: Active users (sidebar)       name: User name       nick: User nickname       first_name: User's first name       last_name: User's last name       link: Link to user's profile       avatar: User's avatar       role: User role (privileges, access etc.) team_users: Users who are also team members (sidebar)       name: User name       nick: User nickname       first_name: User's first name       last_name: User's last name       link: Link to user's profile       avatar: User's avatar       home_site: Current forum        url: User profile URL       www: User's personal site connected_forum: Connected (sister) forum       forum_name: Name of connected forum       forum_description: Description of connected forum       forum_url: URL of connected forum user: Current user       login: Current user login       first_name: Current user's first name       last_name: Current user's last name       profile_path: Current user's profile path       avatar: Current user's avatar       votes_left: Number of votes current user has left posts_javascript: Javascript for posts posts: All posts in current category and its subcategories       created_at: Post creation date       title: Post title       content: Post content       url: Post URL       path: Post path       vote_box: Does the post have a voting box (true/false)       answer: Highlited reply to post       votes: Is voting enabled for this post       votes_count: Number of votes cast for this post       comments_count: Number of comments on this post       email: Post author's email       kind: Post kind       kind_code: Post kind code       status: Post status       user_report_url: URL to report user as spammer       post_edit: URL to post edition       view_count: Post view count       user: User type (guest, admin etc.)       admin_info: Information about post author (browser user agent etc.)       image: Image attached to post           url: Image URL           url_medium: URL medium       attachments: Post attachments           file_name: File name           image: Is the attachment an image (true/false)           url: Attachment URL           url_medium: URL medium       categories: Categories           url: Category URL           name: Category name       category: Category           url: Category URL           name: Category name       comments_box: Comments box       add_comment_box: Adds comments box       voters: Users who voted for this post       anonymous_votes: Number of anonymous votes              field1: A custom field added by forum owner       field2: v.s.       field3: v.s.       field4: v.s.       field5: v.s.       field6: v.s.       field7: v.s.       field8: v.s.       field9: v.s.       field10: v.s. top_posts: 10 most popular posts post: Current post category: Current category other_from_category: 10 other posts from current category

Example how to use it:
{{system.meta}} {{system.favicon}} {{system.custom_css}} <!-- Bootstrap -->
<link href=
"//s3-eu-west-1.amazonaws.com/assets.sugester.pl/assets/bootstrap-3-1-1/css/bootstrap.css"
media="screen" rel="stylesheet" type="text/css">
<link href=
"//s3-eu-west-1.amazonaws.com/assets.sugester.pl/assets/bootstrap-3-1-1/css/default.css"
media="screen" rel="stylesheet" type="text/css">{{system.javascript}}
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
 <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
 <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<div class="jumbotron">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 text-right help-block small">
                {{#if user}} Zalogowany <a href=
                "{{user.profile_path}}">{{user.login}}</a> | <a href=
                "/logout">Wyloguj</a> {{else}} <a href="/login">Logowanie</a> |
                <a href="/signup">Rejestracja</a> {{/if}}
            </div>
        </div>
        <div class="row">
            <div class="col-lg-8">
                <h1>{{forum_name}}</h1>
            </div><!-- col-lg-6 -->
            <div class="col-lg-4">
                {{#if forum_logo_url}} <a href="/"><img alt="{{forum_name}}"
                class="img-responsive pull-right" src="{{forum_logo_url}}"></a>
                {{/if}}
            </div>
        </div><!-- row -->
        <div class="row">
            <div class="col-lg-12">
                <p class="lead">{{forum_description}}</p>
            </div><!-- col-lg-12 -->
        </div>{{search_or_add}}
    </div><!-- container -->
</div><!-- jumbotron -->
<div class="container">
    <div class="row">
        <div class="col-lg-9 col-sm-9" id="main_content">
            {{feedback_status_menu}} {{body}}
        </div><!-- main_content -->
        <div class="col-lg-3 col-sm-3" id="sidebar">
            {{sidebar}}
        </div><!-- sidebar -->
    </div><!-- row -->
</div><!-- container -->
<div id="footer">
    <div class="container">
        <p class="text-muted text-right small"><a href="http://sugester.pl/"
        target="_blank">Powered by Sugester</a></p>
    </div>
</div>​

Was this entry helpful?

Share

Comments