My intention is to make a widget for a view.

I did a clean install of the module. After that I found 2 admin screens: Setup (/admin/settings/embed-widgets) and Default values (/admin/settings/embed-widgets/defaults). On the Setup I found widget setup for nodes.
I set the permissions for the UI (4) and found a checkbox on the node edit form.

But I think there must be more, that I cannot find. Or, how can setup a widget for a view?

Comments

Flying Drupalist’s picture

Can you access node/%/widget?

If not then it's probably the same problem I have:

http://drupal.org/node/482498

altparty’s picture

I enabled 'embed widgets' for one content type. Next I edit one node of this type and create a widget for this node.
Then a tab called 'widget' appears for this node. It refers to node/xx/widget.
So this might not be the same problem.

jtsnow’s picture

There is no UI yet in 6.x-2.0 for creating a widget from a view. This will probably be implemented in the coming week.

For now, you could create a widget for a view using code such as:

  $widget = new embed_widget_placement();
  $widget->title = "My Widget";
  $widget->format = "iframe";
  $widget->platform = 'html';
  $widget->set_source('view', array('view' => 'glossary', 'display' => 'page'));
  $widget->set_variable('width', 300);
  $widget->set_variable('height', 200);
  $widget->save(TRUE);

  $embed_code = $widget->get_code();  // Paste this string into your site to embed the widget.

The above example will create a widget for the glossary view.

altparty’s picture

Status: Active » Closed (fixed)

Understood.