This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
TitleNamed Sections
Date28-Jun-2006 17:10:44 EEST
JSPWiki version2.4.x
SubmitterJerome Duprez
Idea CategoryMarkupIdea
_cmdlineform='ideaform' category='GenericIdea' status='NewIdea' title='Named Sections' page='Idea' map='title=Title;version=JSPWiki version;url=Reference;category=Idea Category;x;status=Idea Status'
Idea StatusNewIdea

InsertPagePlugin enables to insert the content of a specific "section" of a page, but the definition of a section is rather limited: a section as per this plugin is a portion delimlited by ---- markers, and the plugin enables to specify the section by its index ([{InsertPage page=SomePageName section=1}]).

The choice of the delimiter seems to be an afterthought, or an arbitrary choice by the plugin developer; I don't know if it corresponds to any notion of "section" in the engine: for example, the TextFormattingRules mention ---- as "horizontal ruler, nothing suggests it's also a structural marker.

It's a relatiely good choice anyway, as it is visually very expressive in the page's text. However, it's a bit unsafe to rely on the index to identify the section itself. Anyone could modif the inserted page and add/remove/reorder ---- rulers, and the inserting page would then insert the wrong content.

I'd like to be able to specify an identifier for the section. The ruler marker could still be used, though with augmented syntax, such as:

 ----{[Section name="Section Foo"]} 
And the InsertPagePlugin would support:
[{InsertPage page=SomePageName section="Section Foo"}]

Additionally, titles should implicitly define sections of their own (they already induce anchors that can be linked to). So if a page contains a !! Some title, the InsertPagePlugin should support a directive such as

[{InsertPage page=SomePageName section="Some Title"}]
, and insert the whole corresponding "paragraph" (all contents until the next heading of the same level).

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 28-Jun-2006 17:13 by Jerome Duprez.