I have been configuring the new eSearch widget Robert released not too long ago and have also been integrating some custom aspects to the widget to suit my needs. Everything is working great except for one part. In the SearchResultItemRenderer I have added a Label and Icon that are both click able and direct our users to a different part of the application. My question is about the visibility of this Label and Icon. Is there a way to only make them visible when searching on a specific layer?
For example I would like the Icon and Label to show with the results when I search the Parcels layer, but have them not show up when I search the Street Lights layer. The Icon and Label are only relevant to the Parcels layer. I understand one solution is to have two separate search widgets, but I am trying to keep it in one widget if possible.
Sure you can put some logic in the itemrenderer to test if certain attributes (that are only present in the parcel layer) are available and if so than the includeIn and Visible properties of the label and icon would be true else false.
Sure you can put some logic in the itemrenderer to test if certain attributes (that are only present in the parcel layer) are available and if so than the includeIn and Visible properties of the label and icon would be true else false.