Hi,
I’ve discover that there are two types of parsing that can be done with the new Parser.
The first "Early Parsing" is done in one clean sweep of the source. The [[Widget]] will set the value of [[+Placeholder]] to [[AnotherWidget]]. In this situation all tags are parsed in one call.
example:
[[Widget]]
[[+Placeholder]]
Late Parsing - this is done when a widget or Content Field sets the value of a placeholder to output a tag after that placeholder has already been processed. In this situation [[Widget]] sets the value of the [[+Placeholder]] to [[AnotherWidget]]
[[+Placeholder]]
[[Widget]]
The parser will ignore the [[+Placeholder]] on the first sweep then process the [[Widget]]. At the end of parsing the source it will then replace [[+Placholder]] with the assigned value. At this stage there’s a [[AnotherWidget]] inside the source.
How do we handle this situation? Should we reparse the source or just document it so that users will be aware of the two types of parsing?
The thing to note here is that placeholders can be placed anywhere inside a document.