Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to create a view block on Profile2 pages which shows content created by the profile's owner. For a regular node this is straightforward: add an "Author" relationship and add a contextual filter which filters by UID with the option "Also look for a node and use the node author" selected.
I imagine the best way to achieve this is to extract a PID or UID from the profile page in a PHP contextual filter but I'm not sure how to achieve this. I've attempted to use menu_get_object() but this doesn't seem to work with Profile2 pages. Any thoughts?
Massive thanks in advance for your help.