The following NPSOBJ instructions can be used to execute Tcl procedures in layouts (replace
procedureAlias with the procedure’s alias and
content with HTML code, text or an NPSOBJ instruction):
<npsobj name="procedureAlias" insertvalue="systemExecute"> content </npsobj>
Two parameters will be passed to the procedure to be executed: the ID of the file or link in whose context the instruction is executed as the first parameter and the evaluated
content of the element as the second.
After the CMS has executed the procedure the NPSOBJ instruction will be replaced by the procedure result.
To be able to execute Tcl procedures in this way an administrator must have registered the aliases in the CMS initialization file (in the dictionary
Please note that the Tcl code called has no write access to the CMS data and that the procedures to be executed at export-time must also be available on the live server if the Template Engine is used.
The supplied editLink system command
The CMS includes the predefined system command
editLink. Using this command, you can create links to the Content Navigator page of the exported file:
<NPSOBJ insertvalue="systemExecute" name="editLink"> Edit this file </NPSOBJ>
For the links generated on export to function properly, the value of the Content Manager’s system configuration entry
guiUrl must be set to the URL of the GUI’s web application.