2

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

Thanks

1 Answer 1

2
<?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).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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