snipt

Ctrl+h for KB shortcuts

PHP

Drupal 6 Template Views Block Code w/ args

$block['content'] = views_embed_view('my_view_name', 'block', $some_arg);
return $block;
https://snipt.net/embed/cc56d9001c124515b314df025fc7a9ca/
/raw/cc56d9001c124515b314df025fc7a9ca/
cc56d9001c124515b314df025fc7a9ca
php
PHP
2
2019-06-16T05:25:30
True
False
False
/api/public/snipt/27480/
drupal-6-template-views-block-code-w-args
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="x">$block[&#39;content&#39;] = views_embed_view(&#39;my_view_name&#39;, &#39;block&#39;, $some_arg);</span> </span><span id="L-2"><a name="L-2"></a><span class="x">return $block;</span> </span></pre></div> </td></tr></table>
drupal6, php