Comments (4)
It works now! Thanks for your help! :)
from lumberjack.
Dumping is not possible natively in twig.
I personally use this: https://github.com/djboris88/timber-debugger
from lumberjack.
Dumping is not possible natively in twig. I personally use this: https://github.com/djboris88/timber-debugger
I tried this but sadly I still have the issue.
Weird because I'm using Timber (without Lumberjack) and its working there...
from lumberjack.
It works well for me,
Try to use this ServiceProvider :
<?php
namespace App\Providers;
use Ajgl\Twig\Extension\BreakpointExtension;
use Rareloop\Lumberjack\Config;
use Djboris88\Twig\Extension\CommentedIncludeExtension;
use HelloNico\Twig\DumpExtension;
class TimberDebuggerServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*/
public function boot(Config $config)
{
if (defined('WP_DEBUG') && WP_DEBUG && function_exists('add_filter')) {
add_filter('timber/loader/twig', function ($twig) {
$twig->addExtension(new CommentedIncludeExtension());
$twig->addExtension(new DumpExtension());
$twig->addExtension(new BreakpointExtension());
return $twig;
});
/*
* Adding a second filter to cover the `Timber::render()` case, when the
* template is not loaded through the `include` tag inside a twig file
*/
add_filter(
'timber/output',
function ($output, $data, $file) {
return "\n<!-- Begin output of '" . $file . "' -->\n" . $output . "\n<!-- / End output of '" . $file . "' -->\n";
},
10,
3,
);
}
}
}
from lumberjack.
Related Issues (20)
- Post Type not registering HOT 6
- Wrong class on the WordPress Controllers documentation? HOT 2
- Undefined Illuminate classes
- Custom Taxonomy support in Lumberjack HOT 5
- Enqueue Assets HOT 2
- Popularity HOT 4
- lumberjack-bedrock permission error while cloning Bedrock repository HOT 3
- Lumberjack doesn't see archive-{post_type}.php with proper controller class HOT 4
- Incomplete theme HOT 2
- Request with a dot (".") inside a Custom Route paramter returns a 404 (not found) exception HOT 1
- WooCommerce products in Lumberjack HOT 1
- How can I return a 404 Not Found error from my product controller? HOT 1
- Custom post type translatable labels not working HOT 3
- [bug] site stop working after install wp-browser
- QueryBuilder - Collection error after installing Intervention/ImageCache HOT 1
- pass cache time to TimberResponse?
- Access correct pagination information when using the Query Builder HOT 1
- php 8.0.0 not compatible with v4 (composer issue)
- PHP8 Compatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lumberjack.