E
E
evgeny_ryabcev2014-03-18 23:53:52
PHP
evgeny_ryabcev, 2014-03-18 23:53:52

How to make your {title} tag (or any other) in your php file like in DLE?

It is interesting to learn the principle of creating such tags.
For example:
there is a constant -
define('TEMPLATE', VIEW. 'mytemplate/');
To write a path in HTML, you need to do this -

<script type="text/javascript" src="<?=TEMPLATE?>js/functions.js"></script>

but how to make {THEME} instead of <?=TEMPLATE?>, as in DLE?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-03-19
@evgeny_ryabcev

use twig . So, learn regular expressions.

L
link_irk, 2014-03-19
@link_irk

PHP is its own templating engine and doesn't need other templating engines.
Consider whether there is a big difference between records {THEME}and<?php echo $theme ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question