Hi!
I have a code in page.tpl.php

<div id='primary-links' class='clear-block'>
        <?php
echo l('Create Story !', "node/add/story", false, "destination=node/add/story");
?>
      </div>

I would like to edit the code that if the user is on "node/add/story" that total code is ignored so no div class or the code is visible to the browser?
I am kind of noob in php I would really appreciate any help

Comments

efolia’s picture

The simplest solution would be to wrap that output in a conditional statement.

if (!(arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'story')) {
    print "<div id='primary-links' class='clear-block'>". l('Create Story !', "node/add/story", false, "destination=node/add/story") ."</div>";
}

Cheers :-)

efolia

werushka’s picture

Sweet :) efolia
thanks a lot