Answer the question
In order to leave comments, you need to log in
Are there HTML/XML-like templating engines?
There are quite a few different view templating engines that compile when they are parsed into, say, a native view. For example something like this for php:
@if ($article->status == 'active')
<div class="content">
{{ $article->content }}
@foreach ($articles->comments as $comment)
{{ $comment->content }}
@endforeach
</div>
@endif
<if article.status = 'active'>
<div class="content">
{{ article.content }}
<for comment in article.comments>
{{ comment.content }}
</for>
</div>
</if>
<for each="comment" in="article.comments" by="comment_id">
{{ comment.content }}
</for>
<check if="article.status = 'active'">
{{ article.status }}
</check>
<form name="article" class="form">
<label for="title" />
<field name="title" class="form-input" />
<field name="type" class="form-select" />
<submit />
</form>
<form name="article" class="form" method="POST" action="/article/save/">
<input type="hidden" name="_token" value="12345" />
<label for="title">Article title</label>
<input name="title" class="form-input" type="text" placeholder="Enter title..." />
<select name="type" class="form-select">
<option value="blog">Blog</option>
<option value="gallery">Gallery</option>
</select>
<input type="submit" value="Create article" />
</form>
Answer the question
In order to leave comments, you need to log in
and then figure out where the markup is, and where the templater code is, no thanks, no need, twig is enough for me.
It is believed that xml is not convenient for editing, so they try to move from it to a simpler syntax (yaml, json).
A "template engine" exists on the client side, called angular.js. He does the right thing - complements and expands html.
Of course I have. slaslaphptal.org/introduction.html
Initially, everyone tried to do it either through comments, or by embedding it in tags, or with their own tags, and the highlighting worked, lately everyone has come up with their own tags.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question