create new tag
, view all tags
In named includes I noted that after implementing named sections, that:
  • " The name for include should be allowed (at some point) to extract sections denoted using TOC sections - ie heading tags - as well. "

One way of describing that is implicit named sections - there's always more. (It also falls under the idea of fine grained addressing - PurpleWiki for example these days can transclude arbitrary NIDs & HIDs )

Essentially the idea is simple:

  • People create documents with headings scattered through it
  • These headings can already be automatically extracted to form section labels - indeed this is what %TOC% already does to many extents. (There's issues there...)
  • These should then be able to be pulled in, in the same way named include sections can be.

Implementation would be fairly trivial and follow the same syntax ( %INCLUDE{"topic" section="name"...}% ). The reason I say it that way is because the code to perform this has largely already been written:

  • Peter Masiar's version of the Plugins.CommentPlugin already uses this functionality (albeit not this particular syntax - it's used in defining templates for templated comments).
  • Peter Thoeny's slideshow plugin also looks at document structure, but rather than use it to include content, it uses it to exclude content and display sectioned content in a separate way.
  • The work I've done on handling the syntax above is already in place, tried and tested. Furthermore it supports parameterisation both via include and URL, as well as random variables.

Peter Masiar's code is in a more usable for this kind of usage.

Issues: (minimal)

  • TOC naming is not deterministic for users - they do not want to count 32 characters and do anything special to identify how a node is identifed. (Another aspect of a UserUnfriendly system) The simplest approach therefore is to simplify node naming to allow the person to use the full title. (This arbitrarily denies the use of a named sections with characters not suitable for being HTML attributes.)
  • Make it so that what the node is called is visible in topic view. Two methods (at least) here can be used - either 1) either display it next to, below, bracketed, etc 2) show it only when clicked, hovered over, or similar. (onclick=, title=, etc)
  • TOC headings/sections are not directly suitable due to the fact that if you include topic B inside topic A, topic A will have TOC headings pointed at the content transcluded from topic B as if it existed in topic A. (We'd want the anchors to point at the right topic - there no point in including TopicA#RandomSection if RandomSection only exists in TopicB. (Or rather than no point, significantly harder - I can think of good reasons you'd want to do that.)

Either way, I suspect the best starting point is to modify named include sections to fall back to Peter Masiar's code.


-- MS - 06 Feb 2004
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-07-18 - RafaelAlvarez
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.