Ticket #84 (closed enhancement: fixed)

Opened 7 years ago

Last modified 7 years ago

Use getRecursiveTiddlerText when constructing POST/PRE blocks

Reported by: UdoBorkowski Owned by: UdoBorkowski
Priority: major Milestone: 2.1
Component: core Version:
Severity: high Keywords:
Cc:

Description

Currently the content of the POST-BODY, POST-HEAD, PRE-BODY, PRE-HEAD blocks is defined by the content of one corresponding tiddler (e.g. by "MarkupPostBody?" for the POST-BODY block). To retrieve the Markup text the function store.getTiddlerText is used.

If a Markup block should cover various aspects, like loader code for XHTML, other "on load" JavaScript? code etc. the text may become quite long and hard to read and maintain. To better structure the Markup text therefore we should use store.getRecursiveTiddlerText instead of getTiddlerText.

This way one could put the different parts in separate tiddlers and just refer to them in the Markup tiddler. E.g. the MarkupPostBody? tiddler may look like this:

[[LoaderXHTML]]
[[Adsense]]
[[StatCounter]]

This also makes the Markup tiddler "self-documenting" (if proper tiddler names are used).

Changing from getTiddlerText to getRecursiveTiddlerText is not 100% compatible because [[...]] sections in the Markup tiddler (and referenced tiddlers) are now considered are references. But this will only result in incompatible results if (by accident) the content of the [[...]] refers to an existing tiddler. This is not usually the case for the text defined in the Markup tiddlers.

If this rare case is still considered an issue one may tag the Markup tiddler with a special tag (like "Linked" or so) and only call getRecursiveTiddlerText when that tag is set. I don't suggest this tagging since it makes using the Markup tiddler harder. Also it is not possible to "tag" a shadow tiddler and currently there is already one Markup tiddler defined as a shadow.

Change History

Changed 7 years ago by UdoBorkowski

I created this ticket.

Udo

Changed 7 years ago by anonymous

  • severity changed from low to high

Changed 7 years ago by UdoBorkowski

  • owner changed from JeremyRuston to UdoBorkowski

Changed 7 years ago by UdoBorkowski

  • status changed from new to closed
  • resolution set to fixed

Changed 7 years ago by UdoBorkowski

Fixed in changeset:283

Changed 7 years ago by JeremyRuston

Fixed in changeset:285

Changed 7 years ago by JeremyRuston

  • reporter changed from anonymous to UdoBorkowski
Note: See TracTickets for help on using tickets.