[support] Testing for arg() OR is_front

A clonemeagain at gmail.com
Mon Jul 12 04:39:05 UTC 2010


Perhaps multiple calls to arg shifts..

How about this:

$a = arg(1);
if(($a != 27) || ($a != 39) || !$is_front){
?>
<div>You won't see this on node/27, node/39 or the front page.</div>
<?php
}

On 12 July 2010 12:14, Hendry <hendry.htc at gmail.com> wrote:

> I noticed that you have wrong syntax on this line:
>        <?php if (arg(1) != "27") || (!$is_front): ?>
> It should be
>        <?php if (arg(1) != "27" || !$is_front): ?>
>
> # Hendry
>
> On Mon, Jul 12, 2010 at 9:20 AM, Chris McCreery
> <chris.mccreery at gmail.com> wrote:
> > Right now I have this:
> > <?php if (arg(1) != '39'): ?>
> > <div> Content </div>
> > <?php endif; ?>
> > This works just fine but when i try to add in a second arg(1) and OR
> > statement it doesn't work. Any ideas?
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100712/005e2771/attachment.html 


More information about the support mailing list