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[1] 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).

[#1] Indeed ---- as the section delimiter mixes structuring and rendering information. There are situations where you want to structure a page in sections without explicitly rendering section limits (see Bug Problem With Including Commented Out Sections). This specific point may call for a separate idea Idea Structural Section Markup, and is part of a wider Idea Page Structure to be developped.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-3) was last changed on 01-Dec-2006 12:20 by JeromeDuprez