L
L
LB7772014-07-14 23:46:26
PHP
LB777, 2014-07-14 23:46:26

How to highlight in PhpStorm tpl files of php syntax?

Highlighting in PhpStorm for tpl files of php syntax.
Good time of the day!
I work with OpenCart, and it, in turn, uses its own template engine instead of the smarty template engine and all data is output to files with the .tpl extension through php variables and this design is obtained

<?php if ($text) { ?>
<h1><?php echo $text; ?></h1>
<?php } else { ?>
<p><?php echo $text_none; ?></p>
<?php } ?>

In this case, PhpStorm does not highlight curly braces {} and it is almost impossible to navigate in large code.
How to make PhpStorm highlight php syntax in tpl files?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nazar Mokrinsky, 2014-07-15
@LB777

File -> Settings -> IDE Settings -> File types -> PHP files
Add the desired file extension to the list by analogy.

S
Serge Tkach, 2017-02-15
@SergeTkach

At 10: Settings -> Editor -> File types

K
khyzhniak, 2020-09-17
@khyzhniak

5f636a63a6e6e331349982.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question