Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8285847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:33:57+00:00 2026-06-08T11:33:57+00:00

I am trying to put together a template with jsRender instead of my own

  • 0

I am trying to put together a template with jsRender instead of my own version that I was on, but, I keep getting this: “Uncaught JsRender Error: Syntax error Unmatched or missing tag: “{{/for}}” in template:” followed by my entire template.

Here is a truncated version of my code, any ideas as to what is going on? Or is it just the nested for loops?

<div class="page" id="{{:info.id+info.name}}">
    {{for sources}}
    <header class="feed-title">
        <div class="feed-title-content">
            <span class="feed-title-text">{{:title}}</span>
        </div>
    </header>
    <section class="row">
        <div class="scroll-left"></div>
        <div class="row-scroll">
            {{for articles}}

                          // An if, else and some standard content insertion stuff is/was here

            {{/for}}
        </div>
        <div class="scroll-right"></div>
    </section>
    {{/for}}
</div>

Screenshot of chrome’s dev tools showing my array structure:

Screenshot 1 of an expanded view:

Screenshot 1 of an expanded view

And collapsed:

And collapsed

Any ideas as to what is going on?

EDIT: Forgot to mention, I am loading this from an external file using John Papa’s code

EDIT: Demo and code:

Chrome’s dev tools output of my array:

Object
    info: Object
    sources: Array[1]
        0: Object
            articles: Array[7]
                0: Object
                1: Object
                2: Object
                3: Object
                4: Object
                5: Object
                6: Object
            link: "http://lifehacker.com"
            title: "Lifehacker"

Demo: http://jsfiddle.net/SO_AMK/3J7AE/

And of a working nested array:

Object
    foo: "names"
    testData: Array[2]
        0: Object
            markup: "<span style='background: yellow'>John</span>"
            name: "John"
            secondary: Array[1]
                0: Object
                1: Object

Demo: http://jsfiddle.net/SO_AMK/Vf8Bq/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:33:58+00:00Added an answer on June 8, 2026 at 11:33 am

    Looking at the jsfiddles, the issue was that tags in the section not actually shown in the code above, using {{if}} and {{else}}, didn’t use the correct syntax:

    They used:

    {{for articles}}
        {{if img === false }}
            ...
        {{/if}}
        {{else}}
            ...
        {{/else}}
    {{/for}}
    

    instead of

    {{for articles}}
        {{if img === false }}
            ...
        {{else}}
             ...
        {{/if}}
    {{/for}}
    

    See this demo sample of {{if}} and {{each}} tags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to put together this layout... ... but I'm having issues with the
I'm trying to put together a navigation menu that uses click instead of hover
I trying to put together an Android app that will take a picture and
I'm trying to put together a layout using Bootstrap that resembles your typical OS
I'm trying to put together a Java Webstart app, but don't want it to
I'm trying to put together a simple RSS widget (for my wordpress blog) that
I have been trying to put together something that allows me to extract points
I am trying to put together a page that has a header that spans
I am trying to put together a mysql query, that links 3 tables together.
SilverStripe 2.4.7 Hi I'm trying to put together a template to structure my JSON.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.