You are here: Foswiki>System Web>Category>DeveloperDocumentationCategory>PerlDoc (2024-12-23, UnknownUser)Edit Attach
See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview
internal package
Foswiki::Render::Zones Support for rendering anchors. Objects of this class represent a set of generated anchor names, which must be unique in a rendering context (topic). The renderer maintains a set of these objects, one for each topic, to ensure that anchor names are not re-used.
ClassMethod
new() Construct a new zones set.
ObjectMethod
finish() Break circular references.
ObjectMethod
addToZone($zone, $id, $data, $requires) Add $data
identified as $id
to $zone
, which will later be expanded (with renderZone() - implements %RENDERZONE%
). $ids
are unique within the zone that they are added - dependencies between $ids
in different zones will not be resolved, except for the special case of head
and script
zones when {MergeHeadAndScriptZones}
is enabled.
In this case, they are treated as separate zones when adding to them, but as one merged zone when rendering, i.e. a call to render either head
or script
zones will actually render both zones in this one call. Both zones are undef'd afterward to avoid double rendering of content from either zone, to support proper behaviour when head
and script
are rendered with separate calls even when {MergeHeadAndScriptZones}
is set. See ZoneTests/explicit_RENDERZONE*.
This behaviour allows an addToZone('head') call to require an id that has been added to script
only.
$zone
- name of the zone $id
- unique identifier $data
- content $requires
- optional, comma-separated string of $id
identifiers that should precede the content Note: Read the developer supplement at Foswiki:Development.AddToZoneFromPluginHandlers if you are calling
addToZone()
from a rendering or macro/tag-related plugin handler
Note: Macros will be expanded in all zones. TML markup will not be expanded in the
head
andscripts
zones. Any formatting inhead
andscripts
zones including [[TML links]] must be done directly using HTML. TML pseudo-tags likenop
.verbatim
,literal
. andnoautolink
are removed fromhead
andscript
zones and have no influence on the markup. All other zones will be rendered as a normal topic.
Implements %ADDTOZONE%
.
Edit | Attach | Print version | History: r1 | Backlinks | View wiki text | Edit wiki text | More topic actions
Topic revision: r1 - 2024-12-23, UnknownUser
Copyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback