Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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

share|improve this answer
    
But that will give me the whole page with the header. I just want the profile content –  joshmmo Nov 10 '12 at 16:53
    
profile content including the tabs and I want to be able to style it. –  joshmmo Nov 10 '12 at 17:53
    
i have updated answer. read again –  monymirza Nov 11 '12 at 6:55
    
Thanks, for those looking for more documentation on this it can be found here drupal.org/node/144488 –  joshmmo Nov 12 '12 at 16:07
    
You did an error "If you want show a specific region then use this." –  Heihachi Apr 8 '13 at 9:47
add comment
<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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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