I want to customize my Identify Popup in CMV to include some links, images, and special formatting. I have attempted to follow the suggestions mentioned here on GitHub, and here is the code:

enter image description here

define([
'dojo/i18n!./nls/main',
'dojo/_base/lang'
], function (i18n, lang) {

var linkTemplate = '<a href="{url}" target="_blank">{text}</a>';
function directionsFormatter (noValue, attributes) {
    return lang.replace(linkTemplate, {
        url: 'https://www.google.com/maps/dir/' + attributes.Address + ' Louisville, KY',
        text: 'Get Directions'
    });
}
return {
    map: true,
    mapClickMode: true,
    mapRightClickMenu: true,
    identifyLayerInfos: true,
    identifyTolerance: 5,
    draggable: false,/*
    hideEmptyPopop: false,*/

    // config object definition:
    //  {<layer id>:{
    //      <sub layer number>:{
    //          <pop-up definition, see link below>
    //          }
    //      },
    //  <layer id>:{
    //      <sub layer number>:{
    //          <pop-up definition, see link below>
    //          }
    //      }
    //  }

    // for details on pop-up definition see: https://developers.arcgis.com/javascript/jshelp/intro_popuptemplate.html

    identifies: {
        identifies: {
        Properties: {
            1: {
                title: i18n.identify.apegProperties.allProperties,
                fieldInfos: [{
                    fieldName: 'SiteBuildingName',
                    label: 'Name:',
                    visible: true
                }, {
                    fieldName: 'IsBuilding',
                    label: 'Type:',
                    visible: true
                }, {
                    fieldName: 'City',
                    label: "City:",
                    visible: true
                }, {
                    fieldName: 'County',
                    label: 'County:',
                    visible: true
                }, {
                    fieldName: 'DatePropertyIsAvailable',
                    label: 'Availability:',
                    visible: true
                }, {
                    fieldName: 'ForLease',
                    label: 'For Lease:',
                    visible: true
                }, {
                    fieldName: 'LeaseTerms',
                    label: "Lease Terms:",
                    visible: true
                }, {
                    fieldName: 'ForSale',
                    label: 'For Sale:',
                    visible: true
                }, {
                    fieldName: 'SalePrice',
                    label: 'Sale Price:',
                    visible: true
                }, {
                    fieldName: 'Rail',
                    label: 'Railway Access:',
                    visible: true
                }, {
                    fieldName: 'Electric',
                    label: 'Electric at Site:',
                    visible: true
                }, {
                    fieldName: 'Gas',
                    label: 'Gas at Site:',
                    visible: true
                }, {
                    fieldName: 'Sewer',
                    label: 'Sewer at Site:',
                    visible: true
                }, {
                    fieldName: 'Telecom',
                    label: 'Telecom at Site:',
                    visible: true
                }, {
                    fieldName: 'WaterAtSite',
                    label: 'Water at Site:',
                    visible: true
                }, {
                    fieldName: 'URL',
                    label: 'Ohio InSite:',
                    visible: true
                }, {
                    fieldName: 'Lat',
                    label: 'Latitude:',
                    visible: true
                }, {
                    fieldName: 'Long',
                    label: 'Longitude:',
                    visible: true
                }]
            },
            0: {
                title: i18n.identify.apegProperties.riverProperties,
                description: "<b>{name}</b><br />" +
                "{address2}<br />" +
                "<a href='{RiverLink}' target='_blank'><b>Click for Detailed Site Information</b></a>" +
                "<img src="{Picture}" width="230" height="180" ><br />" +
                "<b><u>Site Summary</b></u><br />" +
                "<b><br>{description}</b><br><br />" +
                "<b>Acreage:</b>  {sitesize}<br />" +
                "<b>Square Footage:</b>  {buildingsize}<br />" +
                "<b>For Sale:</b>  {forsale}<br />" +
                "<b>For Lease:</b>  {forlease}<br /><br />" +
                "<b>River Port on Site:</b>  {DockOnSite}<br />" +
                "<b>Railway Access:</b>  {israil}<br />" +
                "<b>Miles to Highway:</b>  {DistanceHighway}<br />" +
                "<b>Miles to Interstate:</b>  {DistanceInterstate}<br />" +
                "<b>Miles to Airport:</b>  {AirportsDist}<br /><br />" +
                "<b>Electric on Site:</b>  {poweronsite}<br />" +
                "<b>Gas on Site:</b>  {gasonsite}<br />" +
                "<b>Water on Site:</b>  {wateronsite}<br />" +
                "<b>Sewer on Site:</b>  {seweronsite}<br />" +
                "<b>County:</b>  {county}<br />"
            }
        }
    }
};
});

After I added the html code for the riverProperties Popup none of the Popups were working for any of the other features. When you comment our the riverProperties Popup, it work no problem. Can anyone else spot an issue

closed as too broad by nmtoken, PolyGeo Mar 25 '17 at 10:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.