1
<ul id="sortable">{{#each put.images}}
    <li class="imageSort" id="{{this}}">
      <div class="perant_edit_img">
      <span class="del_img_edit">
      <i class="fa fa-times"></i>
      </span>
      <img src="/uploads/items/{{this}}" alt="First slide">
      </div>
      </li>
    {{/each}}
</ul>

i need this value add in each {{put.dirImg}} put how ?

{{put.dirImg}} It is printed only outside the each but inside the each is can not printed!

2
  • What does put contain ? Commented Sep 7, 2018 at 12:46
  • but************* Commented Sep 7, 2018 at 12:50

1 Answer 1

1

Try this.

<ul id="sortable">
  {{#each put.images}}
    <li class="imageSort" id="{{this}}">
      <div class="perant_edit_img">
      <span class="del_img_edit">
      <i class="fa fa-times"></i>
      </span>
      <img src="/uploads/items/{{../dirImg}}{{this}}" alt="First slide">
      </div>
      </li>
    {{/each}}
</ul>
Sign up to request clarification or add additional context in comments.

8 Comments

i need this {{put.dirImg}} in src="/uploads/items/{{this.images}}" add here :
src="/uploads/items/{{put.dirImg}}{{this.images}}"
images is array and "dirImg" is single string
sorry but Your idea does not work on my code Did not work
Can you post a sample of the put variable contents ?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.