Select to view content in your preferred language

Link support in new 2.3 popups

2925
13
04-19-2011 09:48 AM
JonFisher
Emerging Contributor
Hi,

Can anyone confirm if the new popups in the 2.3 viewer have linkfield support, and if so how to configure it? The help link (http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m300000013000000.htm) still shows the old configuration and none of the new examples include links. I can see that I could use the description tag to set up a link, but then the fields tag is ignored (so I'd need to put them all in the description). I tried adding the linkfield to fields, and then adding <link>{ERA_REPT}</link> (I also tried <linkfield>{ERA_REPT}</linkfield>) after title and before the fields but that didn't work.

Can someone clarify if the only link support is via <description> as opposed to having a link icon?

Jon
Tags (2)
0 Kudos
13 Replies
RobertScheitlin__GISP
MVP Emeritus
0 Kudos
JonFisher
Emerging Contributor
Thanks! It's funny that with all the things I tried I didn't try simply making the field visible to see if it was clickable or not. It's great that links are automatically recognized now (including photos being embedded).
0 Kudos
JonFisher
Emerging Contributor
Whoops, I spoke too soon. When I mouseover a record in the Query widget, I see the new popup with the properly embedded picture (see attached ViaQuery.jpg).

However, WITHOUT the Query widget open, if I simply configure the popup to display the field that has the photo links it just shows up as a link (NoPhoto.jpg):
<configuration>
    <title>{DESC_}</title>
    <fields>
        <field name="DESC_"/> 
        <field name="HYPERLINK" visible="true"/>
    </fields>
</configuration>


I also tried using the <description> tag, and found that if I include {HYPERLINK} the picture is embedded but the height doesn't expand to show the whole picture (see CutOffPhoto.jpg). If I use <img src="{HYPERLINK}"/> nothing is displayed at all. In the code below I have it both ways, but you get the same result with just {HYPERLINK} w/out the img src bit.
<?xml version="1.0" ?>
<configuration>
    <title>{DESC_}</title>
 <description><![CDATA[<a href="{HYPERLINK}"><img src="{HYPERLINK}"/>{HYPERLINK}</a>.<br>a. ]]>
    </description>
    <fields>
        <field name="DESC_"/>
        <field name="HYPERLINK" /> 
    </fields>
</configuration>


So can someone clarify the proper way to have embedded photos properly handled by the new popups without having to use the Query widget?
0 Kudos
JonFisher
Emerging Contributor
Sorry, I forgot the attachments; they are now attached here.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jon,

   If the link is to an image than you need to setup a media tag:

<configuration>
    <title>{DESC_}</title>
    <fields>
        <field name="DESC_"/> 
        <field name="HYPERLINK"/>
    </fields>
    <medias>
        <media chartfields="" type="image" caption="" imagesource="{HYPERLINK}" imagelink="{HYPERLINK}"/>
    </medias>
</configuration>
0 Kudos
JonFisher
Emerging Contributor
Ah! You're the best Robert! I'm pretty helpless until the documentation gets updated. That worked great.
0 Kudos
haThach
Regular Contributor
Hi Robert,

I have a "HyperLink" field contain a path that link to .pdf file. How do I show a small pdf icon without displaying the full path.

<configuration>
    <title>{EXTENSION_GIS}</title>       
    <fields>
  <field name="EXTENSION_GIS" alias="Extension:" visible="true"/>
  <field name="INSTALL_YEAR" alias="Year:" visible="true"/>
  <field name="HyperLink" alias="HyperLink:" visible="true"/>
</fields>

</configuration>


Thanks in advance.
Ha Thach
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ha Thach,

   That is not currently possible with out extending the PopUpRendererSkin component of the API.
0 Kudos
haThach
Regular Contributor
Thanks! Robert for this quick response.

Ha
0 Kudos