NAME

Plagger::Plugin::Widget::Simple - Simple widget creation using config

SYNOPSIS

- module: Widget::Simple
  config:
    link: http://www.example.com/
    content_dynamic: "Entry from [% entry.author %]"

DESCRIPTION

Widget::Simple is a plugin that allows you to write your own widget using a simple configuration file.

CONFIG

link: http://example.com/add

URL that the widget links to. Required.

query
query:
  version: 4
  url: $args->{entry}->url

Query parameter to append to the URL. If the value contains $, it'll be automatically eval()ed. Optional.

content
content: <img src="http://example.com/img.gif" alt="foo" />

Content to display in a widget. HTML tags will be displayed as is and thus any HTML meta characters have to be escaped. Required, if you don't use content_dynamic.

content_dynamic
content_dynamic: "Entry from [% entry.author | html %]"

If you want to dyncamically generate the content of widget, use content_dynamic instead. Value of the content_dynamic is compiled and rendered using Template-Toolkit. Required, if you don't use content.

AUTHOR

Tatsuhiko Miyagawa

SEE ALSO

Plagger