diff options
author | intrigeri <intrigeri@boum.org> | 2008-12-30 21:36:40 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2008-12-30 21:36:40 +0100 |
commit | c01485ae1ad751ac87eb3cfa392f6d276d5b1157 (patch) | |
tree | 62dd6f1ba3df0f6a669c08528f32be4202463ce4 /doc/plugins | |
parent | 4e4fb18dbecf22a9eeea37f2632924f6d1ea67da (diff) |
renamed the renamepage hook to renamelink, added rename hook
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'doc/plugins')
-rw-r--r-- | doc/plugins/write.mdwn | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9b5cf27f7..79a9066ce 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -360,14 +360,24 @@ This hook is called whenever ikiwiki normally saves its state, just before the state is saved. The function can save other state, modify values before they're saved, etc. -### renamepage +### renamelink - hook(type => "renamepage", id => "foo", call => \&renamepage); + hook(type => "renamelink", id => "foo", call => \&renamelink); This hook is called by the [[plugins/rename]] plugin when it renames -something. The hook is passed named parameters: `page`, `oldpage`, -`newpage`, and `content`, and should try to modify the content to reflect -the name change. For example, by converting links to point to the new page. +something, once per page linking to the renamed page's old location. +The hook is passed named parameters: `page`, `oldpage`, `newpage`, and +`content`, and should try to modify the content of `page` to reflect +the name change. For example, by converting links to point to the +new page. + +### rename + + hook(type => "rename", id => "foo", call => \&renamepage); + +When a page or set of pages is renamed, the referenced function is +called once per renamed page, and passed named parameters: `oldpage`, +`newpage`. ### getsetup |