{"id":2629,"date":"2014-12-11T18:32:05","date_gmt":"2014-12-11T14:32:05","guid":{"rendered":"http:\/\/www.dhtmlx.com\/blog\/?p=2629"},"modified":"2023-05-05T13:51:01","modified_gmt":"2023-05-05T10:51:01","slug":"new-dhtmlxtemplate-function","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/new-dhtmlxtemplate-function\/","title":{"rendered":"New dhtmlxTemplate Function: How to Use (Live Demo inside)"},"content":{"rendered":"<p>Two weeks ago we updated <a href=\"https:\/\/dhtmlx.com\/blog\/dhtmlxsuite-4-1-touch-devices\/\" target=\"_blank\">dhtmlxSuite<\/a> to the version 4.1. This update introduced a new interesting function &#8211; <a href=\"https:\/\/docs.dhtmlx.com\/dhxtemplate.html\" target=\"_blank\">dhtmlxTemplate<\/a>. We decided to tell more about it in case if some of you haven&#8217;t tried to use it yet.<\/p>\r\n\r\n<p><strong>What is DHTMLX Template?<\/strong><\/p>\r\n\r\n<p>It is a function that allows using templates instead of fixed values. This means that you can have one and the same text which will have different dynamic parts (templates). You may use string, date or number templates or create your own one.<\/p>\r\n\r\n<p><strong>Where to use Template?<\/strong><\/p>\r\n\r\n<p>You can use templates in any texts that are identical in their structure and meaning, but should be different in some parts like names of the people to whom you address in the newsletter, tables with variety of data (date, telephone number, etc.), different views of one and the same object that can be switched on-the-fly (e.g., the grid of goods in online stores), and so on.<\/p>\r\n\r\n<p><strong>How to use Template?<\/strong><\/p>\r\n\r\n<p>Fistly, you should know a template format. The dynamic parts that are changed should be inframed by &#8220;#&#8221;, inside we have the name of a key from json object with additional params. These params are the names of the additional functions for formatting and their arguments.<\/p>\r\n<!--more-->\r\n<p>In practice we have:<\/p>\r\n\r\n<p>#key# <\/p>\r\n<p>#key|function# <\/p>\r\n<p>#key|function:param# <\/p>\r\n<p>#key|function:param:param#<\/p>\r\n\r\n<p>where: <strong>key<\/strong> is a key from json object the value of which will be taken, <strong>function<\/strong> parses value, using a built-in function or a user-defined one (optional), and <strong>param<\/strong> is a param for the function (optional, more than one param can be used).<\/p>\r\n\r\n<p><h3><strong>4 simple steps to use DHTMLX Template<\/strong><\/h3><\/p><br>\r\n\r\n<p><strong>Step 1.<\/strong> Create a string that contains a template. E.g.:<\/p>\n\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> str <span class=\"sy0\">=<\/span> <span class=\"st0\">&quot;Current date\/time: #value|date:%Y-%m-%d %H<span class=\"es0\">\\\\<\/span>:%i#&quot;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n\n<p><strong>Step 2.<\/strong> Specify values for the template.<\/p>\n\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> values <span class=\"sy0\">=<\/span> <span class=\"br0\">&#123;<\/span>value<span class=\"sy0\">:<\/span> <span class=\"kw1\">new<\/span> <span class=\"kw4\">Date<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span> <span class=\"co1\">\/\/ or new Date().getTime()<\/span><\/div><\/div>\n\n<p><strong>Step 3.<\/strong> Apply dhtmlxTemplate function.<\/p>\n\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> text <span class=\"sy0\">=<\/span> window.<span class=\"me1\">dhx4<\/span>.<span class=\"me1\">template<\/span><span class=\"br0\">&#40;<\/span>str<span class=\"sy0\">,<\/span> values<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n\n<p><strong>Step 4.<\/strong> Check the result.<\/p>\n\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">console.<span class=\"me1\">log<\/span><span class=\"br0\">&#40;<\/span>text<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span> <span class=\"co1\">\/\/ Current date\/time: 2014-11-12 13:55<\/span><\/div><\/div>\n\n<p>In the example above we use a built-in function \u201cdate\u201d. Among the other default template functions you may find:<\/p>\r\n\r\n<p><strong>lowercase<\/strong>  &#8211;  used to convert characters to lower case<\/p>\r\n<p><strong>uppercase<\/strong>  &#8211;  used to convert characters to upper case<\/p>\r\n<p><strong>maxlength<\/strong>  &#8211;  used for limiting the count of characters in a text<\/p>\r\n<p><strong>number_format<\/strong>  &#8211;  used for number formatting<\/p>\r\n\r\n<p><h3><strong>Custom template function<\/strong><\/h3><\/p>\r\n\r\n<p>As it was mentioned before, you can also create your own templates. For this, the following preparations precede the standard steps for using template.<\/p>\r\n\r\n<p>Firts of all, we give a name for a new function. Our new function will change the color of the text and according to this, we\u2019ll call it \u2018text_color\u2019.<\/p>\n\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">window.<span class=\"me1\">dhx4<\/span>.<span class=\"me1\">template<\/span>.<span class=\"me1\">text_color<\/span> <span class=\"sy0\">=<\/span> <span class=\"kw1\">function<\/span><span class=\"br0\">&#40;<\/span>value<span class=\"sy0\">,<\/span> color<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><\/div><\/div>\n\n<p>Note that the first param is always a value, the second (and others) is a param that will be defined in the template. For the example above we only need a param for color:<\/p>\n\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"kw1\">return<\/span> <span class=\"st0\">&quot;&lt;span style='color:&quot;<\/span><span class=\"sy0\">+<\/span>color<span class=\"sy0\">+<\/span><span class=\"st0\">&quot;;'&gt;&quot;<\/span><span class=\"sy0\">+<\/span>value<span class=\"sy0\">+<\/span><span class=\"st0\">&quot;&lt;\/span&gt;&quot;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n\n<p>After that there are the steps that are already familiar to you:<\/p>\n\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> str <span class=\"sy0\">=<\/span> <span class=\"st0\">&quot;#value|text_color:red#&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">var<\/span> values <span class=\"sy0\">=<\/span> <span class=\"br0\">&#123;<\/span>value<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;Important!&quot;<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">var<\/span> text <span class=\"sy0\">=<\/span> window.<span class=\"me1\">dhx4<\/span>.<span class=\"me1\">template<\/span><span class=\"br0\">&#40;<\/span>str<span class=\"sy0\">,<\/span> values<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\nconsole.<span class=\"me1\">log<\/span><span class=\"br0\">&#40;<\/span>text<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span> <span class=\"co1\">\/\/ &lt;span style='color:red;'&gt;Important!&lt;\/span&gt;<\/span><\/div><\/div>\n\n<p><h3><strong>Online Book Shop with dhtmlxTemplate<\/strong><\/h3><\/p>\r\n\r\n<p>The following demo is created to demonstrate how template simplifies the building of such an online store where different views can be easily switched.<\/p>\r\n\r\n<p>With dhtmlxTemplate you can switch languages, book cover and the description of books on-the-fly. Check it by yourselves:<\/p>\r\n\r\n<!--raw-->\r\n<div id=\"main_container\">\r\n\t<div id=\"my_mode_switchers\">\r\n\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"560px\">\r\n\t\t\t<tr><td align=\"left\">\r\n\t\t\t\t<input type=\"button\" onclick=\"showBooks(tpl_grid);\" value=\"grid\">\r\n\t\t\t\t<input type=\"button\" onclick=\"showBooks(tpl_details);\" value=\"details\">\r\n\t\t\t<\/td><td align=\"right\">\r\n\t\t\t\t<input type=\"button\" onclick=\"setLang('en');\" value=\"en\">\r\n\t\t\t\t<input type=\"button\" onclick=\"setLang('ru');\" value=\"ru\">\r\n\t\t\t\t<input type=\"button\" onclick=\"setLang('fr');\" value=\"fr\">\r\n\t\t\t\t<input type=\"button\" onclick=\"setLang('de');\" value=\"de\">\r\n\t\t\t\t<input type=\"button\" onclick=\"setLang('es');\" value=\"es\">\r\n\t\t\t<\/td><tr>\r\n\t\t<\/table>\r\n\t<\/div>\r\n\t<div id=\"my_books_here\">\r\n\t\tloading&#8230;\r\n\t<\/div>\r\n<\/div>\r\n<style>\r\n\t#main_container {\r\n\t\twidth: 600px;\r\n\t\tposition: relative;\r\n\t\tpadding: 20px 0px 15px 0px;\r\n\t\tmargin-left: auto;\r\n\t\tmargin-right: auto;\r\n\t}\r\n\t#my_books_here {\r\n\t\tposition: relative;\r\n\t\twidth: 560px;\r\n\t\tmargin-top: 1px;\r\n\t\tmargin-left: auto;\r\n\t\tmargin-right: auto;\r\n\t}\r\n\t#my_mode_switchers {\r\n\t\tposition: relative;\r\n\t\twidth: 560px;\r\n\t\tmargin-bottom: 20px;\r\n\t\tmargin-left: auto;\r\n\t\tmargin-right: auto;\r\n\t}\r\n\t#my_mode_switchers table td {\r\n\t\tfont-size: 11px;\r\n\t\tfont-family: Tahoma;\r\n\t}\r\n\tdiv.tpl_grid {\r\n\t\tdisplay: inline-block;\r\n\t\tposition: relative;\r\n\t\tbackground-color: white;\r\n\t\twidth: 185px;\r\n\t\tborder: 1px solid #e0e0e0;\r\n\t\tmargin-left: -1px;\r\n\t\tmargin-top: -1px;\r\n\t\tpadding-bottom: 14px;\r\n\t\topacity: 0.9;\r\n\t\tz-index: 0;\r\n\t\ttransition: all 0.1s;\r\n\t\tcolor: #666;\r\n\t}\r\n\tdiv.tpl_grid:hover,\r\n\tdiv.tpl_details:hover {\r\n\t\tborder-color: #c0c0c0;\r\n\t\tbox-shadow: 0 0 12px rgba(0,0,0,0.1);\r\n\t\tz-index: 1;\r\n\t\topacity: 1;\r\n\t\tcolor: #444;\r\n\t}\r\n\tdiv.tpl_details {\r\n\t\tposition: relative;\r\n\t\twidth: 560px;\r\n\t\tborder: 1px solid #e0e0e0;\r\n\t\tmargin-left: -1px;\r\n\t\tmargin-top: -1px;\r\n\t\topacity: 0.9;\r\n\t\tz-index: 0;\r\n\t\ttransition: all 0.1s;\r\n\t\tcolor: #666;\r\n\t}\r\n\tdiv.tpl_details td {\r\n\t\ttext-align: left;\r\n\t\tvertical-align: top;\r\n\t}\r\n\tdiv.tpl_details td.tpl_img {\r\n\t\twidth: 130px;\r\n\t\ttext-align: center;\r\n\t}\r\n\tdiv.tpl_details img.book_cover {\r\n\t\theight: 120px;\r\n\t}\r\n\tdiv.tpl_details td.tpl_descr {\r\n\t\tpadding-top: 24px;\r\n\t}\r\n\timg.book_cover {\r\n\t\theight: 150px;\r\n\t\tmargin: 10px;\r\n\t\tpadding: 2px;\r\n\t\tborder: 1px solid #f1f1f1;\r\n\t}\r\n\tdiv.tpl_str {\r\n\t\ttext-align: center;\r\n\t\tfont-family: Tahoma;\r\n\t\tfont-size: 12px;\r\n\t\tline-height: 19px;\r\n\t}\r\n\tdiv.tpl_str span.tpl_value {\r\n\t\tfont-weight: bold;\r\n\t}\r\n\tdiv.tpl_details div.tpl_str {\r\n\t\ttext-align: left;\r\n\t}\r\n<\/style>\r\n<script src=\"https:\/\/dhtmlx.com\/docs\/products\/codebase\/dhtmlx.js\"><\/script>\r\n<script>\r\n\tvar lang = \"en\";\r\n\tvar labels = {\r\n\t\ten: {author: \"Author\", title: \"Title\", cover: \"Type of cover\", pnum: \"Number of pages\", publr: \"Publisher\"},\r\n\t\tru: {author: \"\u0410\u0432\u0442\u043e\u0440\", title: \"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\", cover: \"\u041f\u0435\u0440\u0435\u043f\u043b\u0435\u0442\", pnum: \"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\", publr: \"\u0418\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\"},\r\n\t\tfr: {author: \"Auteur\", title: \"Nom\", cover: \"Couverture\", pnum: \"Quantit\u00e9 des pages\", publr: \"Editeur\"},\r\n\t\tde: {author: \"Autor\", title: \"Titel\", cover: \"Einband\", pnum: \"Seitenzahl\", publr: \"Verlag\"},\r\n\t\tes: {author: \"Autor\", title: \"T\u00ectulo\", cover: \"Formatos\", pnum: \"Longitud\", publr: \"Editor\"}\r\n\t};\r\n\tvar icons = [\r\n\t\t\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/12\/template-catch-22.jpg\",\r\n\t\t\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/12\/template-animal-farm.jpg\",\r\n\t\t\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/12\/template-cats-cradle.jpg\"\r\n\t];\r\n\tvar books = {\r\n\t\ten: [\r\n\t\t\t{author: \"Joseph Heller\", title: \"Catch-22\", cover: \"Paperback\", pnum: \"544\", publr: \"Simon & Schuster\", icon: icons[0]},\r\n\t\t\t{author: \"George Orwell\", title: \"Animal Farm\", cover: \"Hardcover\", pnum: \"144\", publr: \"Houghton Mifflin Harcourt\", icon: icons[1]},\r\n\t\t\t{author: \"Kurt Vonnegut\", title: \"Cat\u2019s Cradle\", cover: \"Paperback\", pnum: \"304\", publr: \"Dell Publishing\", icon: icons[2]}\r\n\t\t],\r\n\t\tru: [\r\n\t\t\t{author: \"\u0414\u0436\u043e\u0437\u0435\u0444 \u0425\u0435\u043b\u043b\u0435\u0440\", title: \"\u0423\u043b\u043e\u0432\u043a\u0430-22\", cover: \"\u041c\u044f\u0433\u043a\u0438\u0439\", pnum: \"544\", publr: \"Simon & Schuster\", icon: icons[0]},\r\n\t\t\t{author: \"\u0414\u0436\u043e\u0440\u0434\u0436 \u041e\u0440\u0443\u044d\u043b\u043b\", title: \"\u0421\u043a\u043e\u0442\u043d\u044b\u0439 \u0434\u0432\u043e\u0440\", cover: \"\u0422\u0432\u0435\u0440\u0434\u044b\u0439\", pnum: \"144\", publr: \"Houghton Mifflin Harcourt\", icon: icons[1]},\r\n\t\t\t{author: \"\u041a\u0443\u0440\u0442 \u0412\u043e\u043d\u043d\u0435\u0433\u0443\u0442\", title: \"\u041a\u043e\u043b\u044b\u0431\u0435\u043b\u044c \u0434\u043b\u044f \u043a\u043e\u0448\u043a\u0438\", cover: \"\u041c\u044f\u0433\u043a\u0438\u0439\", pnum: \"304\", publr: \"Dell Publishing\", icon: icons[2]}\r\n\t\t],\r\n\t\tfr: [\r\n\t\t\t{author: \"Joseph Heller\", title: \"Catch-22\", cover: \"Broch\u00e9\", pnum: \"544\", publr: \"Simon & Schuster\", icon: icons[0]},\r\n\t\t\t{author: \"George Orwell\", title: \"La Ferme des animaux\", cover: \"Poche\", pnum: \"144\", publr: \"Houghton Mifflin Harcourt\", icon: icons[1]},\r\n\t\t\t{author: \"Kurt Vonnegut\", title: \"Le Berceau du chat\", cover: \"Broch\u00e9\", pnum: \"304\", publr: \"Dell Publishing\", icon: icons[2]}\r\n\t\t],\r\n\t\tde: [\r\n\t\t\t{author: \"Joseph Heller\", title: \"Falle 22\", cover: \"Taschenbuch\", pnum: \"544\", publr: \"Simon & Schuster\", icon: icons[0]},\r\n\t\t\t{author: \"George Orwell\", title: \"Farm der Tiere\", cover: \"Gebundene Ausgabe\", pnum: \"144\", publr: \"Houghton Mifflin Harcourt\", icon: icons[1]},\r\n\t\t\t{author: \"Kurt Vonnegut\", title: \"Katzenwiege\", cover: \"Taschenbuch\", pnum: \"304\", publr: \"Dell Publishing\", icon: icons[2]}\r\n\t\t],\r\n\t\tes: [\r\n\t\t\t{author: \"Joseph Heller\", title: \"Trampa-22\", cover: \"Tapa blanda\", pnum: \"544\", publr: \"Simon & Schuster\", icon: icons[0]},\r\n\t\t\t{author: \"George Orwell\", title: \"Rebeli\u00f3n en la granja\", cover: \"Tapa dura\", pnum: \"144\", publr: \"Houghton Mifflin Harcourt\", icon: icons[1]},\r\n\t\t\t{author: \"Kurt Vonnegut\", title: \"Cuna de gato\", cover: \"Tapa blanda\", pnum: \"304\", publr: \"Dell Publishing\", icon: icons[2]}\r\n\t\t]\r\n\t};\r\n\twindow.dhx4.template.pair = function(text, key) {\r\n\t\tvar r = \"\";\r\n\t\tif (key != null) r += \"<span class='tpl_param'>\"+labels[lang][key]+\":<\/span> \";\r\n\t\treturn r+\"<span class='tpl_value'>\"+text+\"<\/span>\";\r\n\t};\r\n\tvar tpl_loaded = null;\r\n\tvar tpl_grid = '<div class=\"tpl_grid\">'+\r\n\t\t\t\t'<div class=\"tpl_str\"><img decoding=\"async\" src=\"#icon#\" border=\"0\" class=\"book_cover\"><\/div>'+\r\n\t\t\t\t'<div class=\"tpl_str\">#author|pair#<\/div>'+\r\n\t\t\t\t'<div class=\"tpl_str\">#title|pair#<\/div>'+\r\n\t\t\t'<\/div>';\r\n\tvar tpl_details = '<div class=\"tpl_details\">'+\r\n\t\t\t\t'<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr>'+\r\n\t\t\t\t\t'<td class=\"tpl_img\"><img decoding=\"async\" src=\"#icon#\" border=\"0\" class=\"book_cover\"><\/td>'+\r\n\t\t\t\t\t'<td class=\"tpl_descr\">'+\r\n\t\t\t\t\t\t'<div class=\"tpl_str\">#author|pair:author#<\/div>'+\r\n\t\t\t\t\t\t'<div class=\"tpl_str\">#title|pair:title#<\/div>'+\r\n\t\t\t\t\t\t'<div class=\"tpl_str\">#cover|pair:cover#<\/div>'+\r\n\t\t\t\t\t\t'<div class=\"tpl_str\">#pnum|pair:pnum#<\/div>'+\r\n\t\t\t\t\t\t'<div class=\"tpl_str\">#publr|pair:publr#<\/div>'+\r\n\t\t\t\t\t'<\/td>'+\r\n\t\t\t\t'<\/tr><\/table>'+\r\n\t\t\t'<\/div>';\r\n\tfunction showBooks(tpl) {\r\n\t\tif (tpl == null) tpl = tpl_loaded; else tpl_loaded = tpl;\r\n\t\tvar html = \"\";\r\n\t\tfor (var q=0; q<books[lang].length; q++) html += window.dhx4.template(tpl, books[lang][q]);\r\n\t\tdocument.getElementById(\"my_books_here\").innerHTML = html;\r\n\t}\r\n\tfunction setLang(newLang) {\r\n\t\tlang = newLang;\r\n\t\tshowBooks();\r\n\t}\r\n\tdhtmlxEvent(window, \"load\", function(){\r\n\t\tshowBooks(tpl_grid);\r\n\t});\r\n<\/script>\r\n<!\u2013\/raw\u2013>\r\n\r\n<p>If you have any questions, feel free to leave them in the comments section below.<\/p>","protected":false},"excerpt":{"rendered":"Two weeks ago we updated dhtmlxSuite to the version 4.1. This update introduced a new interesting function &#8211; dhtmlxTemplate. We decided to tell more about it in case if &#8230;","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,71,1,38],"tags":[33,43,14],"class_list":["post-2629","post","type-post","status-publish","format-standard","hentry","category-posts-for-codeproject-com","category-tutorials","category-uncategorized","category-visible","tag-all-posts","tag-dhtmlx-tips","tag-tips"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/2629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=2629"}],"version-history":[{"count":1,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/2629\/revisions"}],"predecessor-version":[{"id":11407,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/2629\/revisions\/11407"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=2629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=2629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=2629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}