Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Array Variable #21

Open
felixcheruiyot opened this issue Nov 18, 2016 · 2 comments
Open

Support for Array Variable #21

felixcheruiyot opened this issue Nov 18, 2016 · 2 comments

Comments

@felixcheruiyot
Copy link

I'd like to loop through a list of items and display it in a table. Something like this:

<table>
  <thead>
    <tr>
      <th>#</th>
      <th>Name</th>
    </tr>
  </thead>
  <tbody>
   {% for item in items %}
    <tr>
      <td>{{item.id}}</td>
      <td>{{item.name}}</td>
    </tr>
    {% endfor %}
  </tbody>
</table>

How can I implement such? It might also be good to see how one can extend the plugin.

@WouterSchoofs
Copy link

+1

@GertSallaerts
Copy link
Member

These kinds of features will have us end up trying to build a complete WYSIWYG for template languages. Some pitfalls to trying to create a WYSIWYG editor for a template language (Twig) are listed here. Add to that, that:

  • we'd have to work within the confines of TinyMCE and
  • that our plugin is meant to work with any template language and they all have different syntaxes for loops, conditionals, ...

My conclusion would be that something like this does not fals within the scope of the plugin. I propose to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants