Enhancement: Code Snippits using LotusScript can now access all fields in Blog Configuration
Tags: Bug Fix Side block Enhancement
The existing code only exposed a single string as the interface between a LotusScript Code Snippit and the rendering core, namely the CodeBlockReturn string.
However, often code snippits may need information about the blog itself, especially stuff like the home URL, it's name and so on. This enhancement exposes all items in the configDoc to the Execute-statement in the rendering core.
The existing code only exposed a single string as the interface between a LotusScript Code Snippit and the rendering core, namely the CodeBlockReturn string.
However, often code snippits may need information about the blog itself, especially stuff like the home URL, it's name and so on. This enhancement exposes all items in the configDoc to the Execute-statement in the rendering core.
Simply by defining the ConfigurationDocument as a public NotesDocument variable in RenderEngine.SideBlocks's (Declarations)-section;
Note that the Execute statement can only interact with public variables as defined above.
Down in the SideBlockCode function I have added the following code;
This sets the ConfigurationDocument NotesDocument as a reference to the existing configDoc, and voila, we can now access all configDoc-items in Code Snippits simply by referencing it's items, such as this;
Why the long ConfigurationDocument? Perhaps it's easier to remember for "not that raw programmers" ?!? What do you think?

