2

Is there a way to tell when we are in the /user/1/edit page vs in the /user/1 page when inside the template file page-user.tpl.php?

Are there any of the $variables that I can check?

I think I would rather check this, than create a nearly identical template file called page-user-edit.tpl.php. Or is there a better way?

1

Check for arg(2) to differentiate both paths. Arg() function docs.

In case user/1 arg(2) will be Null

Incase user/1/edit arg(2) will be 'edit'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.