directive de réduction d'affichage, sur paramètre de thème

This commit is contained in:
Olivier Legat 2021-05-26 17:25:30 +02:00
parent 00c15bdb1b
commit 4071cfcdb8

View file

@ -65,6 +65,11 @@ class AppServiceProvider extends ServiceProvider
return "<?php if(!empty($expression)) { echo sprintf('/ %s', $expression); } ?>";
});
Blade::directive('excerpt_product_title', function($expression) {
$limit = config('theme.max_product_title_length');
return "<?php echo Illuminate\Support\Str::limit($expression,$limit) ?>";
});
//default paginator template for back Office
Paginator::useBootstrap();
}