![Click to include private Public](/linkedpolitics/swish/pldoc/res/public.png)
hooks.pl -- ClioPatria hooks
This module declares the hooks an application may define to extend or
modify some of ClioPatria's behaviour. Hooks are multifile
defined
predicates that -typically- have no default definition. Code using the
hook typically first calls the hook. If the hook succeeds the task is
considered done. Otherwise some default action is performed. For
example, a property myprefix:componentName can be added as a property
that provides a label using this code:
:- use_module(cliopatria(hooks)). rdf_label:label_property(myprefix:componentName).
The example below adds an item to Help
popup of ClioPatria:
:- use_module(cliopatria(hooks)). :- use_module(library(http/http_dispatch)). cliopatria:menu_item(help/about, 'About'). :- http_handler(root(about), about, []). about(Request) :- <generate the about page>