Forum Discussion

Isaac Titlow's avatar
Isaac Titlow
Copper Contributor
Jul 11, 2017

Any ideas how to edit Highlighted content card templates?

Hi, I'm looking to remove the 'edited by' and 'date' part of the card view when using the Highlighted Content webpart on a modern page. I can't find what the name of the display template it uses would be. Any guidance would be much appreciated 

  • Mike_M518's avatar
    Mike_M518
    Copper Contributor

    There is a workaround that I found to remove this data or at least make it appear as blank. If you go to the "Modified By" column in the library the Highlighted Content web part is connected to, select "Created" from the "Show Field" drop down. While this is not a perfect fix, I was able to meet my requirement to remove this data from the Highlighted Content web part view.

    • dpopova's avatar
      dpopova
      Copper Contributor

      Mike_M518 Your workaround works, thank you! However, note it only works if the Highlighted Content Web Part is displaying content from the pages library on the same site it is deployed on. I would like to achieve this in a HC web part on the hub site, displaying content from all associated sites

    • La-TG's avatar
      La-TG
      Copper Contributor

      Mike_M518 hey there! When clicking right on my "Modified By" column, I do not have a "Show Field" option or dropdown associated. Am I at the right place?

  • Thanks for your inquiry Isaac Titlow.

     

    At the moment we don't allow you to change the layouts (either by altering the cards, or adding your own new layout) in Highlighted content. We have a backlog item to allow you remap X field to Y position (e.g. field mapping), and one to allow you to add your own layouts (e.g. display templates). 

     

    It sounds like you'd like a third options, which is enable you to alter/augment/extend existing layouts shipped by Microsoft.

     

    Any other ideas or specifics you need in this area?

    • JanetS's avatar
      JanetS
      Copper Contributor

      It would we nice to get rid of the edited by on the card view. Any progress on customizing these?

      • Michael Cowley's avatar
        Michael Cowley
        Copper Contributor

        It would be nice to be able to create a template within the UI and/or code. 

         

        In the UI we build up the card template by adding/removing components and it saves some kind of json configuration, which could be exported and reused.

         

        Creating custom templates and uploaded them with an app package would be nice too using the SharePoint extensions method.

         

    • Larry Corley's avatar
      Larry Corley
      Brass Contributor

      John_Sanders Hi John, would love to have the ability to swap out "modified by" with another library column (or custom site column).  For example if we are tagging documents with a custom column called "Content Owner" would be more meaningful.  Though I realize that would cause issues if you are filtering on multiple libraries or sites that might not have that custom column.

       

      Also, maybe the ability to "not" display "Modified By".

  • Win Lwin Oo's avatar
    Win Lwin Oo
    Copper Contributor

    I can't install SharePoint Server 2016 prerequisite installer.

    Please help me to fix this error. 

  • AnnetteOHerlihy's avatar
    AnnetteOHerlihy
    Copper Contributor
    Hi Team, wondering if there is any news on this becoming an option in the future?
    Either - remove the edited by from the view
    Or - show "created by" instead
    Thanks!
  • Ryan Gardner's avatar
    Ryan Gardner
    Copper Contributor

    Isaac Titlow 

     

    Insert this code as a modern script editor underneath the highlighted content to remove the modified section:

     

    <style type="text/css">

    .ms-DocumentCardTile .ms-DocumentCard:not(.ms-DocumentCard--compact) .ms-DocumentCardActivity {
    Visibility:hidden !important;
    }

    </style>