0

When a user clicks on the "My Account" link I would like the user's profile to show up in a lightbox much like the admin menu overlay works.

I am using Drupal 7.

I am not sure how to do this. My first attempt was to render $user_profile and put it in a lightbox:

<div id="lightbox_this_div">
   <?php print render($user_profile); ?>
</div>

but $user_profile is not available in page.tpl.php

Any thoughts?

EDIT: To be clear I just want to lightbox the content of the user's profile along with the tabs and be able to style the page. So I am not looking to lightbox the entire /user page with the site headers in an iframe style.

2 Answers 2

1

you need to "rel" tag in link.

<a href="/user" rel="lightframe[|width:400px; height:300px; scrolling: auto;]">My Account</a>

If you want show a specific region then use this.

<a href="/node/xxx #content-inner > *" rel="lightmodal[|width:700px;height:300px;]">Click to see only the content inside #content-inner</a>

Detailed tutorial can be found here

5
  • But that will give me the whole page with the header. I just want the profile content
    – joshmmo
    Nov 10, 2012 at 16:53
  • profile content including the tabs and I want to be able to style it.
    – joshmmo
    Nov 10, 2012 at 17:53
  • i have updated answer. read again
    – monymirza
    Nov 11, 2012 at 6:55
  • Thanks, for those looking for more documentation on this it can be found here drupal.org/node/144488
    – joshmmo
    Nov 12, 2012 at 16:07
  • You did an error "If you want show a specific region then use this." Apr 8, 2013 at 9:47
0
<a href="/node/[nid] .content" rel="lightmodal">
<img src="image.jpg" />
</a>

That's the right way... on d.org some retard edited documentation and now it messed up

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.