This is an advanced topic  for site bulders.

Background:

The second way to interact with an external routine is through the |.linkins:LLLLLLL.| tag.  This tag is the last kind of  tag processed before the page is built.  Yes this means that multiple different extensions can be called but the order with which they will be called may vary and the same extension will be called only once.   LLLLLLL is used to determine which extension will be called.  Each extension will be in a  ".ph" file with which has been installed in the "extensions" directory under the site's normal complex2 program directory.  Within that file must be a single subroutine linkins which does any work required. Because it is called last it can overwrite any other tag except content tags (e.g.,|.content.|, |.content:1.|, |.pContent:15.|) and |.passBack:LLLLLLL.| tags .  It has access to the database as well as any variables passed in from the calling web page.  It is responsible for validating all information it acts on.   Normally these will be built or installed by CyberStrategies personnel.

To use the tag it just needs to be placed into either the template or content.  It will be replaced by the content generated by the extension.  The extension may also set values for other tags.  For example the standard |.linkins:search.| tag also sets |.__searchWords.|, |.__searchSortTopOption.|, \ |.__searchFormatLong| and \ .  And expects to receive information from variables "words", and optionally "__SearchSort" and "__searchFormat'".

Information Flow

  • The CMS tests to ensure that the called LLLLLLL.ph file actually exists in the extensions sub-directory.
  • The subroutine linksis within that file is called and is passed references to the database, web provide variables, the references to the non-content tags (i.e., hash \%v), and whether the visitor is authorized if the page is restricted.   It also knows about the site configuration information.
    • To change the value of an already set tag, it just overwrites it in the hash, $$vREF{tagname} by convention.
    • It should always replace its own tag with a values, e.g., |.linkins:search.|, $$vREF{linkins:search} = ....
    • Any other tags related to the function can also be set similarly, e.g, $$vREF{__searchWords} = search term that was passed in.

TOP↑

This background is for site bulders and the site administrator.