0

I have a views block of user content that I want to display on the user profile page below a custom generated block of user information created in code via a theme function (using the $build['user_picture'] element in hook_entity_view_alter(). If I place the block into the appropriate region using the blocks admin page and configure the block to only appear at user/*, it works fine. However, if I place the block using Context module with the User Profile condition, it places the block above all other content, and there seems to be nothing I can do to drop the block below the user_picture element. The weight for the user picture element is set to -10 by default, but even if I make it lower, nothing changes is.

Is there a way to control the placement of the block via Context so it is below the user_picture element? I can see no way via the UI - either for Context or user profile configuration - or code. Do I have to override user-profile.tpl.php and manually split everything out? I need to use Context to be able to control which user profiles the block is on, so if I can't re-order, then I have to find another mechanism (probably Panels) to control this placement.

Thanks.

0

The weight for the user picture element is set to -10 by default, but even if I make it lower, nothing changes is.

The default weight for system content is 0, so display below that you would want a weight of 1 or more for your block in Context > Reaction > Block (if I'm understanding your issue correctly).

0

Following the general rule (at least for me) that posting a question in a public forum somehow helps me find the answer, I figured this out as soon as I posted this. All I had to do was click on the "Show row weights" link, alter the weight, and that put it right where I wanted it.

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.