Last modified: 2008-06-12 13:08:39 UTC
Following options I want to be implemented, this to make it easier to do usual things to commons things: append=text: Appends a string to the section/page prepend=text: Prepend a string to the section/page sectionprepend=text: Prepends a string to the section, but after the section header Those should be able to work in unison, and override the text parameter (or make it throw an error if both text and the above is given); Example: api.php?action=edit&title=Foo§ion=2§ionprepend={{begin foo}}&append={{end foo}}
(In reply to comment #0) > Following options I want to be implemented, this to make it easier to do usual > things to commons things: > > append=text: > Appends a string to the section/page > > prepend=text: > Prepend a string to the section/page Those sound doable, I'm on it. > sectionprepend=text: > Prepends a string to the section, but after the section header > That's probably not as easy, since it involves parsing the section text to some degree to find out what the section header is. I can't guarantee I'll implement this.
appendtext and prependtext parameters added in r36235. They work for sections too, although prependtext won't do what you expect (it'll prepend your stuff before the section header, appending your stuff to the previous section). Also, keep in mind that no newlines or spaces are added between prependtext, the old content and appendtext; if you want them, add spaces or newlines to the end of prependtext and/or the beginning of appendtext yourself.