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-08-17T05:16:55
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

PHP

Drupal 6 Template Block Embed Code

$block = module_invoke('views', 'block' , 'view', 'News-block_1');
print $block['content'];
https://snipt.net/embed/eafc51de4a9c3c06c427b758ee845696/
/raw/eafc51de4a9c3c06c427b758ee845696/
eafc51de4a9c3c06c427b758ee845696
php
PHP
2
2019-07-10T06:23:32
True
False
False
/api/public/snipt/27474/
drupal-6-template-block-embed-code
<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 = module_invoke(&#39;views&#39;, &#39;block&#39; , &#39;view&#39;, &#39;News-block_1&#39;);</span> </span><span id="L-2"><a name="L-2"></a><span class="x">print $block[&#39;content&#39;];</span> </span></pre></div> </td></tr></table>
drupal6, php