Select to view content in your preferred language

Link support in new 2.3 popups

2929
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
DasaPaddock
Esri Regular Contributor
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>


The description does support html that includes img tags, but you need to set the width. Try 250. See: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#htmlTex...
0 Kudos
JonFisher
Emerging Contributor
The description does support html that includes img tags, but you need to set the width. Try 250. See: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#htmlTex...


Thanks for the idea, but I couldn't get this to work either. I used this code:
<description><![CDATA[<a href="{HYPERLINK}"><img src="{HYPERLINK}" width="250" height="250"/></a>]]>
    </description>

and also tried it without a height. The image still doesn't display for me, UNLESS I also have the media tag set up to display the image, in which case I get two copies of the image.

I also tried to do what Ha was looking to do as follows:
<description><![CDATA[ Download report: <a href="{HYPERLINK}"><img src="http://www.adobe.com/images/pdficon_small.gif" height="17" width="17"/></a>]]></description>


But the img shows up as a single pixel (looks like a period, see attached) UNLESS I have a valid medias tag with a media image (an empty image without a link didn't work). It seems like maybe the issue is that the description doesn't change the height of the display area, but having a media type below does.

So I think technically even if this is a bug Ha could achieve the goal without code by having a media link to a small totally transparent image referenced in the media section.
0 Kudos
AHay
by
Deactivated User
Hi
i have same problem with inability to add an image to Description field using <img> tag
i resolved that if you hard code the url to image ( instead of using a field) it works. ( but this is almost usless)

i also found that if you use the Media tag all works OK for first click of popup  then popup break you on get image, no text fileds

ANSWER
is to use both <decscription> and <fileds> tags  ( yes despite what the documentation says) put all your text fields in <Description> and all your media fields in <fields> and in <Media>
and hey presto pop ups that always work

<configuration>
    <title>Threatened Species  - {TYPE}</title>
 <description>
          <![CDATA[<b>Site Name:</b><BR>{SITENAME}<BR>{PROJ_DESC}<BR><BR><b> Links: </b><BR><a href='{LINK}'><u>Factsheet</u></a><BR><a href='{LINK2}'><u>Website</u></a>]]>
 </description>
    <fields>
       <field name="PIC"/>
  <field name="PIC2"/>
  <field name="PIC_LBL"/>
  <field name="PIC2LBL"/>
 </fields>
   <medias>
        <media type="image" title="{PIC_LBL} - Click to view larger" imagesource="{PIC}" imagelink="{PIC}"/>
  <media type="image" title="{PIC2LBL} - Click to view larger" imagesource="{PIC2}" imagelink="{PIC2}"/>
        
    </medias>
</configuration>
0 Kudos
HeatherGonzago
Esri Contributor
What version of Flex Viewer are you using? I am assuming you are doing all of this through a popup config file and not Application Builder? We are in the process of updating documentation but in case you may have missed it, there was an additional topic created for popups in 3.0 App Builder, http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Configuring_pop_ups_in_applicat.... The concept for working with the Description tag remains the same.
0 Kudos