From 271e723d679dc33b62c897fd22577e81996d958f Mon Sep 17 00:00:00 2001 From: Chi Date: Fri, 5 Jan 2024 08:22:39 +0000 Subject: [PATCH] Issue #3402615: Update documentation for drupal_view_result --- docs/cheat-sheet.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/cheat-sheet.md b/docs/cheat-sheet.md index f4df018..b414e3a 100644 --- a/docs/cheat-sheet.md +++ b/docs/cheat-sheet.md @@ -10,8 +10,11 @@ Specify additional parameters which map to contextual filters you have configure ``` ## Drupal View Result +Checks results for a given view. Note that the results themselves are not printable. ```twig -{{ drupal_view_result('who_s_new', 'block_1') }} +{% if drupal_view_result('cart')|length == 0 %} + {{ 'Your cart is empty.'|t }} +{% endif %} ``` ## Drupal Block