snipt

Ctrl+h for KB shortcuts

PHP

Use PHP in Panels to single out a Node

$nid = ctools_context_keyword_substitute('%node:nid', array(), $contexts);
return $nid == 1062615656 || $nid == 1062637051 || $nid == 1062665081 || $nid == 1062664956;
https://snipt.net/embed/60ac2923ad7136d1f85f013dc0dee67c/
/raw/60ac2923ad7136d1f85f013dc0dee67c/
60ac2923ad7136d1f85f013dc0dee67c
php
PHP
2
2019-06-07T15:14:25
True
False
False
/api/public/snipt/63854/
use-php-in-panels-to-single-out-a-node
<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">$nid = ctools_context_keyword_substitute(&#39;%node:nid&#39;, array(), $contexts);</span> </span><span id="L-2"><a name="L-2"></a><span class="x">return $nid == 1062615656 || $nid == 1062637051 || $nid == 1062665081 || $nid == 1062664956;</span> </span></pre></div> </td></tr></table>
7, Drupal