He Brendan,<br><br>You are on the right track. You just have to add some more php to do another test. A slight change in the structure is that you need to make a variable for the display status and then return it only at the end of the whole snippet. When there is only one test, you can just set the status &quot;True&quot; or &quot;False&quot; directly with a return statement that is in the chunk of code as the test itself (that was how your original snippet did it).<br>
<br>Note that I did NOT test the code, so there definitely could be a type in there.<br><br>I posted it to a pastebin: <a href="http://pastebin.ca/1663597">http://pastebin.ca/1663597</a><br><br>Shai<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal"><b>Hello, </b></p>

<p class="MsoNormal">I found a code snippet on <a href="http://drupal.org" target="_blank">drupal.org</a> that allows a block to
be shown only on specific node types when &#39;Show if the following PHP code
returns TRUE&#39; is checked on the Configure Blocks page:</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">-----</p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">&lt;?php</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);"><br>

</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">if
((</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">arg</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">0</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">) == </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(221, 0, 0);">&#39;node&#39;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">) &amp;&amp; </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">is_numeric</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">arg</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">1</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">)) &amp;&amp;
!(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">arg</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">2</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">))) {</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"><br>

</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"> 
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">$thenode
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">=
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">node_load</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">arg</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">1</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">));’</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"><br>

</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"> 
if (</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">$thenode</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">-&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">type </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">== </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(221, 0, 0);">&#39;blog&#39;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">) {</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"><br>

</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">   
return </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">TRUE</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"><br>

</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"> 
}</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"><br>
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);">}</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 119, 0);"><br>
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 187);">?&gt;</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>

<p class="MsoNormal">-----</p>

<p class="MsoNormal"><br>
this works great, except for that I’d like the block to show for nodes of
type “blog” <b><u>AND</u></b> also on specific pages – in my
case <a href="http://www.mysite.com/blog" target="_blank">www.mysite.com/blog</a> which is a
view showing a list of blogs.  How can I do both? <br>
<br>
</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"><br>
----</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"><b><span style="color: rgb(64, 64, 64);">brendan, <a href="http://fresh-off.com" target="_blank">fresh-off.com</a></span></b></p>

<p class="MsoNormal"><span style="color: rgb(64, 64, 64);">Creative Direction &amp; Consultation:
Web | Print | Brand</span></p>

<p class="MsoNormal"><span style="color: rgb(64, 64, 64);"> </span></p>

<p class="MsoNormal"><span style="color: rgb(64, 64, 64);"><a href="http://fresh-off.com" target="_blank">http://fresh-off.com</a></span></p>

<p class="MsoNormal"><span style="color: rgb(64, 64, 64);"><a href="mailto:hello@fresh-off.com" target="_blank">hello@fresh-off.com</a></span></p>

<p class="MsoNormal"><span style="color: rgb(64, 64, 64);">206.328.1067</span></p>

<p class="MsoNormal"> </p>

</div>

</div>


<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br>