Browse Source

add description and params to drupal_view() (demoing how to make changes)

merge-requests/33/head
Alison Jo 3 years ago
parent
commit
246f869736
  1. 11
      docs/cheat-sheet.md

11
docs/cheat-sheet.md

@ -1,6 +1,17 @@
# Cheat sheet
## Drupal View
Render a view. See <a href="https://www.drupal.org/docs/8/modules/twig-tweak/twig-tweak-and-views">Twig Tweak and Views</a> page for more information.
### Accepted parameters
<dl>
<dt><code class="language-php">$name</code></dt>
<dd><em>String - Required</em> - The name of the view to embed.</dd>
<dt><code class="language-php">$display_id</code></dt>
<dd><em>String - Optional</em> - The display id to embed. Default is <code class="language-php">default</code>.</dd>
<dt><code class="language-php">$...</code></dt>
<dd><em>Mixed - Optional</em> - Any additional parameters will be passed as arguments.</dd>
</dl>
```twig
{{ drupal_view('who_s_new', 'block_1') }}
```

Loading…
Cancel
Save