0

I'm trying to add a ctools custom content type to the user profile override provided by panels.

I have added a context, Logged-in user. I can access the values of this variable in my custom content type like this:

dpm($context['context_user_1']);

However, I also want to access the values for user-being-viewed, which is available in the user profile page by default. With the devel module, I can see the variables are in $context under argument_entity_id:user1, but I can't access them like this:

dpm($context['argument_entity_id:user1']);

How can I access the variables of a context provided by default in Panels?

0

There might be a more elegant way, but here's what I came up with:

$user = reset($context);
$user = $user->data;

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.