Closed (fixed)
Project:
Web Widgets
Version:
6.x-1.0
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2009 at 11:06 UTC
Updated:
9 Oct 2010 at 20:30 UTC
Hi!
I'm starting with my drupal module writing, and I'm having trouble with the API documentation for the module.
(this intro is to say i'm probably doing something stupid) :-)
I've tried to put the sample code in my custom module (all the other bits of the module work)
So, the first bit is:
$['mywidget'] = array(
'#page callback' => 'widgetfunc',
'#access arguments' => array('access content'),
);
but, shouldn't this be more like
$items['mywidget'] = array(
'page callback' => 'widgetfunc',
'access arguments' => array('access content'),
);
At least, that's how my other hook_menu menu items are...
And then, when, after changing the menu item this way I create the widget using the proposed procedure, what I get (for example using the "iframe" type), i get a small iframe with my complete page in it...
I know i'm doing something wrong... could you please help out a noob? :)
thanks
Mario
Comments
Comment #1
vermario commentedno one? :-)
Comment #2
jhedstromIf you don't want the rest of the page, you need to print and exit in your page callback. Something like this:
Comment #3
Will White commented