I have a View and inside it I have and Attachment display. In this attachment I set a Header where I need to print the 2nd url argument. How can I do this? With globals? enter image description here


<?php print arg(1); ?>

See: arg

Arg can be used to get the url arguments. It's 0 indexed, so 0 will give the first url argument.

Notice, when using url aliases that arg will bring the internal url arguments (the original path).

| improve this answer | |

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.