Type Icons Not Working!

Copper Contributor
  1. I have configured my lists/libraries to the modern experience, hence made the type icon clickable.  This only worked with some Lists/libraries.  This "mixed" experience occurs on one single page where the lists in certain parts would have the icons clickable and other lists's icons wouldn't work.
  2. “Infopath forms won’t work with the Modern List experience” https://support-desktop.sharegate.com/hc/en-us/articles/360000696323-InfoPath-forms-with-the-Modern-...  .  That is the way to get icons to work, set the list to the modern experience.  If Infopath forms won’t work in the modern list experience then we either have the use the script below or else nothing.  Am I right?
  3. I inserted script onto a Script Editor Webpart onto a page and it worked on some page but not all.  Weird!

    function CustomIcon(ctx) { 

        if (ctx.CurrentItem.FSObjType == '1') { 

            var ret = "<a href=\"" + ctx.CurrentItem.FileRef + "\">" + 

                      "<img width='16' height='16' title=\"" + ctx.CurrentItem.FileLeafRef + "\" " + 

                      "class='ms-draggable' alt=\"" + ctx.CurrentItem.FileLeafRef + "\" " + 

                      "src=\"/_layouts/15/images/FOLDER.GIF\" border='0' DragId='0'/></a>"; 

        } 

        else { 

            var ret = "<a href=\"" + ctx.CurrentItem.FileRef + "\">" + 

                      "<img width='16' height='16' title=\"" + ctx.CurrentItem.FileLeafRef + "\" " + 

                      "class='ms-draggable' alt=\"" + ctx.CurrentItem.FileLeafRef + "\" " + 

                      "src=\"/_layouts/15/images/" + ctx.CurrentItem['HTML_x0020_File_x0020_Type.File_x0020_Type.mapico'] + "\" " + 

                      "border='0' DragId='0'/></a>"; 

        } 

        return ret; 

    } 

</script>

Does anyone have any suggestions to make all of my Type Icons working/clickable on every page?

 

Thanks,

 

HD

0 Replies