0

By using ctools, i am able to display a form in modal window. Now i wish to display a page(the profile page) in modal window.

Below is the sample code (call by menu page callback) to display a html content in modal window, but how to display a page (user/1/profile) , i know i almost there..

any ideas?

function mymodule_profile_modal(  $user,$js)
{   
  $output = t('<p>Lorem ipsum dolor sit amet...</p>');
  $title = t('Modal example');
  if ($js) {
     ctools_include('ajax');
     ctools_include('modal');
     ctools_modal_render($title, $output);
     // above command will exit().
   }  

 }
0

This tutorial might help you: http://drupion.com/blog/10-steps-creating-ctools-modal-window-drupal-7

| improve this answer | |

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.