I would like to be able to use this module with thickbox so that I can display a node within a thickbox. Inputting node/21 (for example) does not work with thickbox because it tries to load the page theme as well and goes into a loop. I thought a good option would be to use pagearray.module in order to get a node's data and then display that in a thickbox of my own style. However, thickbox works by using what is in the href of the a.thickbox to get what you need into the thickbox. So in order to execute the pagearray_page function that pagearray.module provides, pagearray also would need a hook_menu implementation that could pass the $path variable as a callback_argument. I'm unsure of the best way to accomplish this, but I'm thinking it would be good to use something like /pagearray/node/21 in the anchor's href. (<a href='pagearray/node/21' class='thickbox' rel='gallery'>[link image]</a>)

Here is what I've put into the pagearray.module so far, but could use a little direction since this isn't working.

/**
 * implementation of hook_menu
 */
function pagearray_menu($may_cache) {
  if ($may_cache) {
    $items = array();    
    
    $items[] = array(
      'path' => 'pagearray/'. arg(1) .'/'. arg(2),
      'callback' => 'pagearray_page',
      'callback arguments' => arg(1) .'/'. arg(2),
      'access' => TRUE,
      'type' => MENU_CALLBACK,
     );

    return $items;
  }
}

Comments

sirkitree’s picture

I've posted a forum topic on this as well to see if anyone else can help. Looks like by the amount of projects you're pretty busy nedjo ;-)

- view form topic -

nedjo’s picture

Have a look at how dynamicload.module in Javascript Tools http://drupal.org/project/jstools uses pagearray. Likely you'll want to do something similar. Possibly you could use dynamicload as a dependency. See in particular the menu callback dynamicload_js().

sirkitree’s picture

Sweet! That's exactly what I needed. I'll let you know how I make out. Thanks a ton man!

nedjo’s picture

Title: hook_menu » How to create a menu item that returns Page Array data?
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)