- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
firstspirit - get image reference
Hello,
I am having problems when trying to get the url of an image.
Next you can find the form that I have with a title and an image list:
<CMS_INPUT_TEXT name="pt_T_HL" singleLine="no" useLanguages="yes">
<LANGINFOS>
<LANGINFO lang="*" label="Headline" description="Headline"/>
</LANGINFOS>
</CMS_INPUT_TEXT>
<FS_LIST name="pt_picture" hFill="yes" height="420">
<DATASOURCE type="inline" maxEntries="1" useLanguages="no">
<LABELS>
<LABEL lang="*">"Picture-Uid: " + #item.st_reference.getUid()</LABEL>
</LABELS>
<ACTIONS>
<ACTION name="ADD">
<PARAM name="select-ui">list</PARAM>
</ACTION>
<ACTION name="REMOVE"/>
<ACTION name="EDIT"/>
</ACTIONS>
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
<LAYOUT>
<ADD component="toolbar" constraint="top"/>
<ADD component="stackedview" constraint="hide">
<PARAM name="toolbar-assembly">PANEL</PARAM>
</ADD>
<ADD component="overview" constraint="hide"/>
<ADD component="singleview" constraint="bottom"/>
</LAYOUT>
<TEMPLATES source="sectiontemplates">
<TEMPLATE uid="generic_picture"/>
</TEMPLATES>
</DATASOURCE>
<LANGINFOS>
<LANGINFO lang="*" label="Image"/>
</LANGINFOS>
</FS_LIST>
And in html I have this:
<p:title>$CMS_VALUE(pt_set_formdata.get(#global.language,"pt_T_HL").get())$</p:title>
<p:imageLink>$CMS_REF(pt_set_formdata.get("pt_picture").get().get(0))$</p:imageLink>
For the title is working ok, for the image link no. Can you help me here?
The html and form of generic picture are attached.
MTIA,
Luisa Mesquita
- Labels:
-
Developers
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Luisa,
as you are trying to access an inner field st_reference, you will of course have to provide its name. Furthermore, in a template, you can use a simplified syntax.
So the following should work:
$CMS_REF(pt_set_formdata.pt_picture.first.st_reference)$
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Luisa,
as you are trying to access an inner field st_reference, you will of course have to provide its name. Furthermore, in a template, you can use a simplified syntax.
So the following should work:
$CMS_REF(pt_set_formdata.pt_picture.first.st_reference)$
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Luisa,
do you need further help or did <anyone>'s reply already help you? If so, it would be great if you marked Michael's reply as "correct answer" so that other community users find the solution easily. If you have already found a solution by yourself, it would be very kind of you, if you posted it here.
Best regards
Marian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it was correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you. it worked