<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Customize add widget in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881734#M14132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am customizing add widget and want to add new layers after a define html .. which is defined in widget.html in layerlist widget. Also I am adding layers by layer list widget..&amp;nbsp;&lt;BR /&gt;by default the layer are adding on top i want them in after the html.&lt;/P&gt;&lt;P&gt;Please find snapshot for better understanding&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/391289_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Any lead on this is highly appreciated&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Dec 2017 09:19:47 GMT</pubDate>
    <dc:creator>aishvaryvardhan</dc:creator>
    <dc:date>2017-12-20T09:19:47Z</dc:date>
    <item>
      <title>Customize add widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881734#M14132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am customizing add widget and want to add new layers after a define html .. which is defined in widget.html in layerlist widget. Also I am adding layers by layer list widget..&amp;nbsp;&lt;BR /&gt;by default the layer are adding on top i want them in after the html.&lt;/P&gt;&lt;P&gt;Please find snapshot for better understanding&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/391289_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Any lead on this is highly appreciated&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 09:19:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881734#M14132</guid>
      <dc:creator>aishvaryvardhan</dc:creator>
      <dc:date>2017-12-20T09:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Customize add widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881735#M14133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;???... I am totally at a loss here. what are you asking?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 15:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881735#M14133</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-12-20T15:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Customize add widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881736#M14134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/391379_pastedImage_2.png" style="width: 620px; height: 348px;" /&gt;&lt;/P&gt;&lt;P&gt;I guess this image will give a better picture to you.&lt;/P&gt;&lt;P&gt;Its like some layer I have added by layer list widget and there is some other HTML . I then want to add more layers from add data widget provided it should come after html but by default it is coming in the section above HTML&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Dec 2017 10:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881736#M14134</guid>
      <dc:creator>aishvaryvardhan</dc:creator>
      <dc:date>2017-12-21T10:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Customize add widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881737#M14135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&amp;nbsp; I see what you are after now but sorry I don't have any suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Dec 2017 15:04:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881737#M14135</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-12-21T15:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Customize add widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881738#M14136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert for your pointers &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2017 10:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881738#M14136</guid>
      <dc:creator>aishvaryvardhan</dc:creator>
      <dc:date>2017-12-22T10:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Customize add widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881739#M14137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i'm understanding your situation correctly, you want to have a custom widget that consists out of :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A Layerlist widget,&lt;/LI&gt;&lt;LI&gt;some HTML,&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;A second Layerlist widget.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The first layerlist widget should match the initial webmap layers, and the second layerlist should match the newly added layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An important note to take from the Layerlist widget is: &lt;SPAN style="text-decoration: underline;"&gt;when providing a "layers" param,&lt;/SPAN&gt; the layerlist will only listen to changes to these provided layers. So for the first requirement, the first layerlist... it can&amp;nbsp;easly be done, by using&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;'jimu/LayerStructure' &lt;/EM&gt;&lt;/STRONG&gt;to build the initial layer tree.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tip :&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;LayerStructure&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getInstance&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getWebmapLayerNodes&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is why it's being added above your HTML block, if the layers property of the map LayerList widget is undefined, it will take the list from the map.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;- see :&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/layerlist-amd.html#layers"&gt;https://developers.arcgis.com/javascript/3/jsapi/layerlist-amd.html#layers&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then for the second layerlist you'll need to listen to the map's "layer-add" event and add it to your second layerlist.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;- see&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#event-layer-add" title="https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#event-layer-add"&gt;Map | API Reference | ArcGIS API for JavaScript 3.28&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2019 11:19:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-add-widget/m-p/881739#M14137</guid>
      <dc:creator>KoenDemonie</dc:creator>
      <dc:date>2019-06-19T11:19:46Z</dc:date>
    </item>
  </channel>
</rss>

