diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-12 22:23:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-12 22:23:05 +0000 |
commit | af113e044fe8225a40ddd128f9226b973b0b6437 (patch) | |
tree | 4456d4ee056a3564eb01837ab2f091b57ec540e2 /mod/sitepages/README.txt | |
parent | 088d0638957cd6bc683711743d04091b6789cfd1 (diff) | |
download | elgg-af113e044fe8225a40ddd128f9226b973b0b6437.tar.gz elgg-af113e044fe8225a40ddd128f9226b973b0b6437.tar.bz2 |
Updated site pages docs.
Added ability to pass arguments to custom keywords.
Added user_list keyword.
Reject logged out front pages that don't have [[login_box]].
git-svn-id: http://code.elgg.org/elgg/trunk@5710 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages/README.txt')
-rw-r--r-- | mod/sitepages/README.txt | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/mod/sitepages/README.txt b/mod/sitepages/README.txt index bc4d02007..b2c36c71e 100644 --- a/mod/sitepages/README.txt +++ b/mod/sitepages/README.txt @@ -80,11 +80,13 @@ CONTENTS: keyword, but custom keywords provide a simple way for non-techy users to include ready-made views without the fuss of knowing what they're doing. - The below example creates the 'my_plugin_keyword' keyword that displays the - view at 'my_plugin/keyword_view.' + Custom keywords support arguments in the same format as views and entities. + These arguments are passed to the custom view via the $vars array. It is + the responsibility of the custom view to parse these arguments. - This is exactly the same as saying [[view: my_plugin/keyword_view]] but - much simpler for the user. + The below example creates the 'my_plugin_keyword' keyword that displays the + view at 'my_plugin/keyword_view.' This is exactly the same as saying + [[view: my_plugin/keyword_view]] but much simpler for the user. Example: register_plugin_hook('get_keywords', 'sitepages', 'my_plugin_keywords'); @@ -98,15 +100,17 @@ CONTENTS: return $value; } - NB: No variables are passed to the view when using custom keywords. - 4. HINTS AND QUIRKS - * A custom keyword is more complicated to implement, but simpler for the - end user. + * A custom keyword is slightly more complicated to implement, but is + much simpler for the end user to use. + + * Custom keywords can contain only alphanumeric and the underscore + character. - * The view and entity keywords have limited support for passing arguments, - but the arguments cannot contain '=' or ','. If you need complicated - arguments, it's best to create a custom keyword with a custom view. + * All keywords have limited support for passing arguments but the arguments + cannot contain '=' or ','. If you need complicated arguments for a custom + keyword, it's better to split the functionality into multiple keywords and + views instead of requiring complicated arguments. |