0

Is anyone aware of a script or utility (or DreamWeaver plugin) that will add the file's location on the server, as a commented line, inside the actual file?

I.e. if the file is {server_root}/catalog/theme/template/version2/subfolder/template.twig,

the script should add:

<!-- PATH: {server_root}/catalog/theme/template/version2/subfolder/template.twig -->

inside the actual file itself.

Yes, I can do it manually, but it would save SO much time if there was a way to automate this process.

Any advice would be appreciated!

TomJones999
  • 775
  • 2
  • 13
  • 30
  • Possible duplicate of [Twig - display template names if debug mode is enabled](https://stackoverflow.com/questions/35156570/twig-display-template-names-if-debug-mode-is-enabled) – DarkBee Sep 15 '17 at 05:40
  • Not a duplicate - this is within the OpenCart 3.0.2.0 system, and there's no option to "enable debug mode", it doesn't exist. It's not an IDE, it's an e-Commerce platform, where the developers switched from PHP/TPL to Twig, AND some of the layouts are stored in files and some in database, it's a mess. – TomJones999 Sep 16 '17 at 06:56
  • Did you actualy read the answers in that topic? They have nothing to do with debug but with extending twig so the name of the template is visible inside it. You could use that logic but except put in the path to the template – DarkBee Sep 16 '17 at 11:23

0 Answers0