Skip to content

Add information about debug  #66

@phproberto

Description

@phproberto

User reported this:

I wanted to give you some feedback on something I found when first trying to use Joomla-twig.
On the main github page under Installation it says you can do this to view an example:

JLoader::import('twig.library');
echo Twig::render('@library/twig/examples.html.twig');

When I tried this I received an error because dump() couldn’t be found. I had to use this code to get the example to work:

JLoader::import('twig.library');
$twig = Twig::instance();
$twig->environment()->addExtension(new Twig_Extension_Debug());
$twig->environment()->enableDebug();
echo Twig::render('@library/twig/layouts/examples.html.twig');

After I had that working I had a lot more confidence in using your project.

Add information about how to use debug and how it works in default mode.

joomla-twig-debug-auto

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions