You are here: Foswiki>Tasks Web>Item13246 (01 Jun 2017, GeorgeClark)Edit Attach

Item13246: Context header_text needs better documentation.

pencil
Priority: Low
Current State: Closed
Released In: 2.1.4
Target Release: patch
Applies To: Engine
Component: Documentation
Branches: Release02x01 master Item14288
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
The header_text context is documented as:

header_text when the header text is being processed in a view (useful in plugin handlers)

However it is set in Foswiki::UI::View totally unrelated to header rendering.

The context has been there since the initial import, and does not seem to be used by core. As noted on IRC today, it is not currently useful.

Marking this urgent for 1.2 so we can decide how to handle it. Remove it, deprecate it?

-- GeorgeClark - 02 Feb 2015

Quick scan of the old monolithic subversion repo, that context is not referenced by any extensions. And also not mentioned in any Tasks or in any other webs. My suggestion is to remove it and note it in the release notes.

-- GeorgeClark - 02 Feb 2015

It may appear useless, but it's definitely used. It appears to be used by the templates to select blocks to render. UI::View makes 3 calls to expand macros and render the TML. One in header context, one in body, and last in footer context. Removing any of them makes pieces of the page disappear.

-- GeorgeClark - 02 Feb 2015

Downgrading this to Normal. Documentation issues shouldn't really block the release unless they are related to installation, or basic foswiki usability.

-- GeorgeClark - 23 Feb 2015

Commenting here so I don't have to look for it again. Many templates are broken into 3 areas:
..header area before any topic text...
%TEXT%  (will be substituted with topic text)
...footer area after the topic text...

This topic is rendered in 3 phases:
  1. Expands macros and renders TML in the area before the %TEXT% token, in context header_text
  2. substitutes the %TEXT% token, expands macros and renders TML in context body_text
  3. Expands macros and renders TML in the area after the %TEXT% token in context footer_text

The context is not used by the templates, but can be used by extension to determine which part of the page is being processed while expanding macros.

-- GeorgeClark - 25 Mar 2017
 

ItemTemplate edit

Summary Context header_text needs better documentation.
ReportedBy GeorgeClark
Codebase 2.1.3, 1.1.9, trunk
SVN Range
AppliesTo Engine
Component Documentation
Priority Low
CurrentState Closed
WaitingFor
Checkins distro:19ec61569b8b
TargetRelease patch
ReleasedIn 2.1.4
CheckinsOnBranches Release02x01 master Item14288
trunkCheckins
masterCheckins distro:19ec61569b8b
ItemBranchCheckins distro:19ec61569b8b
Release02x01Checkins distro:19ec61569b8b
Release02x00Checkins
Release01x01Checkins
Topic revision: r9 - 01 Jun 2017, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy