Where Plugins Appear: Difference between revisions
⧼vector-appearance-label⧽
No edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
{ | { | ||
place => "item_tools", | place => "item_tools", | ||
position => 100, | |||
} | |||
]; | |||
</pre> | |||
Note that this is an array so it is possible to render your screen in multiple places. You can also initiate a specific action if the button is clicked in a specific area. In the example below when the link in the key_tools area (top bar next to manage deposits) then the "create" action of our screen plguin is called. | |||
<pre> | |||
$self->{appears} = [ | |||
{ | |||
place => "key_tools", | |||
action => "create", | action => "create", | ||
position => 100, | |||
}, | |||
{ | |||
place => "item_tools", | |||
position => 100, | position => 100, | ||
} | } | ||
]; | ]; | ||
</pre> | </pre> | ||
[[Category:Plugins]] | [[Category:Plugins]] | ||
Revision as of 14:38, 7 December 2010
When you create a screen plugin in EPrints there are a set of locations where the plugin can appear.
You can set the location at which a screen is rendered in the new method of your plugin:
$self->{appears} = [
{
place => "item_tools",
position => 100,
}
];
Note that this is an array so it is possible to render your screen in multiple places. You can also initiate a specific action if the button is clicked in a specific area. In the example below when the link in the key_tools area (top bar next to manage deposits) then the "create" action of our screen plguin is called.
$self->{appears} = [
{
place => "key_tools",
action => "create",
position => 100,
},
{
place => "item_tools",
position => 100,
}
];