Skip to content

Instantly share code, notes, and snippets.

@bastianallgeier
Created March 9, 2015 10:54
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bastianallgeier/c34a99c54fa849f3adb0 to your computer and use it in GitHub Desktop.
Save bastianallgeier/c34a99c54fa849f3adb0 to your computer and use it in GitHub Desktop.
Most basic widget setup for panel widgets. You would put those two files in /site/widgets/mywidget/
<?php
return array(
'title' => 'Widget Title',
'html' => function() {
// any data for the template
$data = array();
return tpl::load(__DIR__ . DS . 'template.php', $data);
}
);
<!-- html for the widget -->
@plaidpowered
Copy link

I'd love to put widgets in the sidebar of the page/content editor...

@solastley
Copy link

I second this ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment