Know if node is in view, edit, delete, etc. in page.tpl I need to verify, in page.tpl file, if page is currently showing a node for viewing, editing, or deleting purposes.

I found I can write arg(2)=="edit" to verify if it is in "edit mode", but how to do for delete (arg(2) is empty such as for view).

What is the correct way to get this information?

Thank you
Here's how to check against all paths related to nodes:

Node view:

arg(0) == 'node' &amp;&amp; arg(1) &amp;&amp; is_numeric(arg(1)) &amp;&amp; !arg(2)


Node edit:

arg(0) == 'node' &amp;&amp; arg(1) &amp;&amp; arg(2) == 'edit'


Node delete:

arg(0) == 'node' &amp;&amp; arg(1) &amp;&amp; arg(2) == 'delete'


Node add "landing" page from where you choose which content type you want to create:

current_path() == 'node/add'


Node add page for a specific content type:

current_path() == 'node/add/YOUR_CONTENT_TYPE'


All node add pages:

arg(0) == 'node' &amp;&amp; arg(1) == 'add' &amp;&amp; arg(2)