Remote access
FirstSpirit enables access from one project to other projects (so-called "remote projects"), which are located on the same FirstSpirit server. In this way, for example, objects (e.g. media), which is managed in a central project can be used by different projects (also called "target projects"). The objects are merely referenced in the target projects, but physically remain in the remote project.
Three different types of remote access are possible in FirstSpirit:
- Remote media (see below)
- Related projects (see FirstSpirit Manual for Administrators)
- Remote schemata (see documentation for the FirstSpirit INTEGRATION module)
Remote Media
A corresponding licence must be available for use of the Remote Media function. To this end, the license.REMOTEPROJECT parameter of the licence (e.g. can be seen in FirstSpirit Server Monitoring, menu item: "FirstSpirit – Configuration – Licence") must be set to value 1.
For further information on configuration, see documentation for FirstSpirit Remote Media and FirstSpirit Manual for Administrators.
Access to remote projects
The input components and link configurations listed below can be used to access media and other objects from remote projects.
Parameters and tags which are relevant for the input components can be looked up in the Forms chapter of the respective input component. In general, the following tags and parameters are involved:
- REMOTE with
- name
- autoReleaseAfterUpload
- uploadFolder - CATEGORY with
- name - FOLDER with
- name
- store - upload (in combination with REMOTE and/or CATEGORY)
- allowLanguageDependentUpload (in combination with REMOTE and/or CATEGORY)
Access via | Significance |
---|---|
Input component, via which pictures from remote projects can be selected and referenced. In addition, CMS_INPUT_PICTURE can be used to upload pictures into remote projects. | |
Input component, via which files from remote projects can be selected and referenced. In addition, CMS_INPUT_FILE can be used to upload files into remote projects. | |
Input component, via which pictures from remote projects can be selected and referenced and given reference-sensitive areas. | |
Input component, via which references to page references from the Site Store and media from the Media Store can be selected. | |
Input component, via which any reference can be selected. In addition, FS_REFERENCE can be used to upload media into remote projects. In FirstSpirit Version 4.2, they are primarily used for conversion in Generic Link Editors . | |
Links
Access via | Significance | Relevant parameters for remote projects |
---|---|---|
Various input screen parts which can be used to enter references to remote projects; these can be used in the following input components:
| depending on link type: | |
Examples of link configurations:
Both the local Site Store and the Media Store of the target project and the Site Store and Media Store of the remote project should be displayed for the reference selection dialog:
<CMS_LINK_CONFIG name="internalLink">
.....
<CMS_PARAM name="sitestoreref" value="showremotesitestore"/>
<CMS_PARAM name="sitestoreref" value="showmediastore"/>
<CMS_PARAM name="sitestoreref" value="showremotemediastore"/>
<CMS_PARAM name="remote" value="sym-Name"/>
.....
</CMS_LINK_CONFIG>
Only the Site Store and Media Store of the remote project should be displayed for the reference selection dialog:
<CMS_LINK_CONFIG name="internalLink">
.....
<CMS_PARAM name="sitestoreref" value="hidesitestore"/>
<CMS_PARAM name="sitestoreref" value="showremotesitestore"/>
<CMS_PARAM name="sitestoreref" value="showremotemediastore"/>
<CMS_PARAM name="remote" value="sym-Name"/>
.....
</CMS_LINK_CONFIG>
Only the Media Store of the remote project should be displayed for the picture selection:
<CMS_LINK_CONFIG name="internalLink">
.....
<CMS_PARAM name="mediaref" value="showremotemediastore"/>
<CMS_PARAM name="mediaref" value="remoteonly"/>
<CMS_PARAM name="remote" value="sym-Name"/>
.....
</CMS_LINK_CONFIG>
Both the Media Store of the remote project and the local Media Store of the target project should be displayed for the picture selection:
<CMS_LINK_CONFIG name="internalLink">
.....
<CMS_PARAM name="mediaref" value="showremotemediastore"/>
<CMS_PARAM name="remote" value="sym-Name"/>
.....
</CMS_LINK_CONFIG>
From FirstSpirit Version 4.2, links can be created and configured with the help of the generic link editors. Analogous to page and section templates, this is done by inserting input components in the form area. For further information, see chapter:Generic link editors. |
Output of references on remote projects
Media and pages from remote projects are output on the website via $CMS_REF(...)$ or $CMS_VALUE(ref:...)$ .
A reference to the selected object is automatically generated, if a remote medium is selected using the input components CMS_INPUT_PICTURE, CMS_INPUT_FILE or CMS_INPUT_PAGEREF and the "Reference" parameter is the variable name of this component:
$CMS_REF("st_picture")$
For output of image maps, see Chapter: CMS_INPUT_IMAGEMAP. |
In FirstSpirit Version 4.2, the FS_REFERENCE input component is primarily used for conversion in generic link editors . |
References must also be $CMS_REF(...)$ or $CMS_VALUE(ref:...)$ resolved. However, here an additional remote attribute (remote:...) must also be given:
<a href="$CMS_REF(remote:seitenreferenz_remote)$">Link to a page in the remote project</a>
The system object #link can be used to output the fields of a reference too:
Output of an internal reference to a remote project:
<a href="$CMS_REF(#link.sitestoreref,remote:#link.sitestoreref_remote)$">$CMS_VALUE(#link.text)$</a>
Picture output of a media reference from a remote project:
<img src='$CMS_REF(#link.mediaref,remote:#link.mediaref_remote)$
Resolutions in remote projects
The resolutions in remote and target projects can differ, i.e. they can have different names and / or different widths or heights.
These different resolutions must be taken into account in the template development. For further information, see $CMS_REF(...)$.
Generation of PDF files
Absolute references in the generation directory are used within the templates for the generation of PDF files via FOP: abs:3
As remote media objects are not copied into the generation directory, a path is generated on generation, which refers to the project directory of the remote project (release status).
Access to the remote project via the Access API
Access to the remote project via the Access API takes place via the UserService interface. The UserService interface has been enhanced to include the getRemoteUserService(String symbolicName) method, which returns the UserService of the remote project.
The symbolic name of the remote project configuration is transferred as the transfer parameter.
Extract from the API documentation:
UserService getRemoteUserService (java.lang.String symbolicName)
Gets the remote userservice by connecting to the project defined in the remote project configuration specified by the given symbolic name.
Parameters:
symbolicName - which specifies the remote project configuration
Returns:
the user service to of the remote project
The connections of the remote project are kept in the user's connection and are also closed with the disconnect() of the user connection.
Invoke the RemoteUserService via the Beanshell console in the target project:
bsh %
e.getProject().getUserService().getRemoteUserService("sym-Name")