Search the FirstSpirit Knowledge Base
Hi all, I have the following inside a Link Template:
<CMS_MODULE>
<FS_REFERENCE name="lt_media" hFill="yes" useLanguages="no">
<FILTER>
<ALLOW type="file"/>
</FILTER>
<LANGINFOS>
<LANGINFO lang="*" label="Form"/>
</LANGINFOS>
<PROJECTS>
<LOCAL name=".">
<SOURCES>
<FOLDER name="files" store="mediastore"/>
</SOURCES>
</LOCAL>
</PROJECTS>
</FS_REFERENCE>
<CMS_INPUT_TEXT name="lt_text" useLanguages="no">
<LANGINFOS>
<LANGINFO lang="*" label="Reference Text"/>
</LANGINFOS>
</CMS_INPUT_TEXT>
</CMS_MODULE>
I would like to set up a rule, so that when the user selects the file, the name of the file shows in the Reference Text input text. Right now I'm having trouble making anything happen at all. In the preview no matter what I put nothing fires. Right now I have this:
<RULES>
<ON_EVENT>
<IF>
<PROPERTY source="lt_media" name="FOCUS"/>
</IF>
<WITH>
<PROPERTY source="lt_media" name="VALUE"/>
</WITH>
<DO>
<PROPERTY source="lt_text" name="TEST"/>
</DO>
</ON_EVENT>
</RULES>
Right now I would like when the name of the file is in focus after selected, something shows up in the lt_text field (which is why I put TEST). The documentation isn't really helping for what I want. Can anyone give me some pointers?
Hi,
Unfortunately, the desired functionality is not possible at least for both SiteArchitect and ContentCreator. The value of the Reference input is not compatible to a plain text. And there is no property to query the textual name of the reference for further processing.
If you need the functionality for SiteArchitect only, you could make use of a Service (via Schedule instead of With) to derive the name from the reference object.
Best regards,
Stefan
Hi,
Unfortunately, the desired functionality is not possible at least for both SiteArchitect and ContentCreator. The value of the Reference input is not compatible to a plain text. And there is no property to query the textual name of the reference for further processing.
If you need the functionality for SiteArchitect only, you could make use of a Service (via Schedule instead of With) to derive the name from the reference object.
Best regards,
Stefan
Well rats. Ok thanks.