Documentation
Code Reference
Installation & Updates
API Reference
Configuration
Documentation & Help Version 5.0
The CMS-CMS API is a simple mechanism used to obtain parts of pages generated with conceptcms. This mechanism is based on a normal HTML request. The idea is to include an additional parameter in the requested conceptcms URL which is changing the behaviour of the application. A normal conceptcms URL looks like this:
http://MYSERVER/cms.php?p=EN,10,7,1.7,,,
The parameter p contais all needed information to identify a conceptcms page.
A CMS-CMS API request looks like this:
http://MYSERVER/cms.php?p=EN,10,7,1.7,,,&remap=[remapDefinition]
The remap parameter is a composed variable which includes three comma separated parameters. All parameters are base64-encoded. An example of the remap parameter is the following:
&remap=cmVtYXBzZXJ2ZXI=,dGlja2Vyc2VydmVy,bWFpbkNvbnRlbnQ=
The encoded parameters contain the following information: remapserver,tickerserver,mainContent.
This is the meaning of the remap sub-parameters:
First sub-parameter (cmVtYXBzZXJ2ZXI=), this is the url to be used in all links generated by conceptcms. This variable is not mandatory and if it is not set, the same conceptcms URL will be used. If the parameter is set, it has to be a valid URL, otherways remaped conceptcms links will be broken. The idea is that the client application decides how it would like to handle links.
Second sub-parameter (dGlja2Vyc2VydmVy), this is updateStatusUrl. This variable is not mandatory but if it is set, this URL will be called everytime the requested conceptcms document has been changed. This mechanism is called "cache ticker". In this way, the client application could decide what to do with documents which are not any more update.
Third sub-parameter (bWFpbkNvbnRlbnQ=), this is the pagePart the client application is requesting. The page parts have to be defined in document or menu item HTML templates in the conceptcms server, they use the syntax of one HTML comment to create a tag that the conceptcms parser will identify and return its content. An example of this tag could look like this:
In the example above, the pagePart identifier is mainContent. In this case, the content returned by a request to this conceptcms page will be:
The subparameters of the remap variable are encoded. To obtain the real values of this sub parameters, the PHP function base64_decode could be used.