Monday, June 25, 2007

[twiki] How to Install SectionalEditPlugin

Just got SectionalEditPlugin to work the way I wanted. Now I'm plastering <editsections/> everywhere.

Install SectionalEditPlugin
- Follow pretty much the same instruction as MultiEditPlugin to do the install.
- One additinal step: in the "configure" program, under "Security Setup" section, {AuthScripts} attribute, add "editsection" to the end of the comma delimited list. This tells TWiki to authenticate the users before editing the section.

Set Edit Link Style
I prefer the wikipedia style of having edit link in the top-right corner of the section. To do that, from the TWiki web, SectionalEditPlugin page, edit these settings:
* Set LABEL = <div style="float:right;margin-top:10px;">%ICON{edittopic}% Edit</div> 
* Set STYLE = ""
* Set PLACEMENT = above


Set the Minimum Depth Preference
I prefer to only auto add the edit link from header level 2 and down sitewide. To do that, from the TWiki web, TWikiPreferences page, add these settings:
Setion Depths Settings for SectionalEditPlugin
* Set SECTIONDEPTH = all
* Set SECTIONDEPTHMIN = 2


Optional: Disable Content Before
I was having a few issues with the page not jumping to the edit box consistently. Still considering whether I should hide the content or not but here's a note in case I want to do it later.
- From [twikipath]/templates/editsection.pattern.tmpl
- Replace %TMPL:DEF{"content"}%
- With %TMPL:DEF{"contentDontShow"}%

Enjoy
Now all you need to do is add <editsections/> just once on the top of a document, and all the headings will automatically become section-editable.

1 comment:

  1. Thanks for this post. The tip on the Security Options allowed me to fix a problem I had with the MultiEditPlugin

    ReplyDelete