I use in my HTML Markups always Underlines, which are programmed with PHP and will replaced by strings. For example:
<title>__TITLE__</title>
So in this way I have just one template of HTML but my pages although have their own title names.
But in one case I have a problem. I also use JQuery and I have this case:
$("div").append("<p>__NAME__</p>");
In this case there is the text "__NAME__" on my Homepage, not e.g. "John".
Can someone help?
var __NAME__ = <?php echo json_encode($name); ?>;. Then you can use the variable__NAME__in JavaScript.