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

  • Home
  • SEARCH
  • 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 8204685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:58:17+00:00 2026-06-07T07:58:17+00:00

I have two templates: <script type=text/template id=todo-template> <label class=todo-content><%= content %></label> <ul class=comment-list style=margin-left:

  • 0

I have two templates:

<script type="text/template" id="todo-template">    
      <label class="todo-content"><%= content %></label>
      <ul class="comment-list" style="margin-left: 2em"></ul>
</script>

<script type="text/template" id="comment-template">    
      <label class="comment-content"><%= content %></label>      
</script>

a template for a post and a template for a comment within a list of the post item. How do I add comments to the right post if there are many different posts. I can’t just use

$("ul.comment-list").append(commentView.render().el);  

in order to append a comment to a post, since it will add comments to all posts. How do I address the corresponding comments-list of the different todo-templates?

  • 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-07T07:58:18+00:00Added an answer on June 7, 2026 at 7:58 am

    It depends on how you are keeping track of your posts. If you have a view for each of your posts then in the view you can reference the right ul through it’s $el,

    Edit:

    Looking at your code I see that each Todo has a child collection view, so what you can do is simple pass in the the right el when you instatiate the collection view,

    var commentCollectionView =  new CommentCollectionView({collection: commentCollection, el: this.$el.find('"ul.comment-list") };
    

    Then in your collection view you can just append it to its el

    this.$el.append(commentView.render().el); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Templates: <script id=tmp_servicebuttons class=template type=text/x-jquery-tmpl> <li><a class=notification href=${id}><img src=${imgsrc}/></a></li> </script> <script id=tmp_navigation class=template
I have a template: <script type=text/template id=action-template-item> <span data-layer=<%= target%> data-uuid=<%= uuid%>>delete</span> </script> I
I'm using an html template: <script id=locationTemplate type=application/template > <p> <input id=searchText type=text />
I have two templates for my HTML email: one for bigger screens, and one
I currently have two apps: app1/ app2/ templates/ app1.html app2.html In app1.html, I'm including
I have a tab control with two different potential item templates: <TabControl ItemTemplateSelector={StaticResource tabTemplateSelector}/>
I have two template files: one for the form (loginFormTemplate) and one for the
I have a small problem with Smarty... I have two different template files in
i have two files:(localhost/template/) index.php template.php each time when i create an article(an article
I have a template for editing a franchise. Inside that template I have two

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.