How to hide the "! NEW" tag on a sharepoint list without affecting lists contained in the site?
Asked Answered
C

2

6

Does anybody know if it is possible to hide the "NEW" label that gets appended to the Title field of a new SharePoint list item?

I have a nightly script that copies a list from one site to another site list and don't need the NEW to show up.

Cirone answered 1/10, 2010 at 18:55 Comment(0)
E
7

If you just want to remove them image from a single view or page rather than every list in the web application what you can use the favourite tool of SharePoint UI hackers everywhere - the Content Editor Web Part (CEWP) along with javascript/jquery/css.

In this case its easy, only CSS required.

For SharePoint 2010

The New image is displayed as so

<IMG class="ms-newgif" title="New" alt="New" src="/_layouts/1033/images/new.gif">

So if you add the following style into a CEWP (you have to use the HTML Source View, rather than the Rich Text Editor).

<style>
  IMG.ms-newgif {display:none;}
</style>

The New image will be hidden.

WSS3 and SharePoint 2007

The CSS is a little more complex

<style>
    TABLE.ms-unselectedtitle TD.ms-vb IMG {display:none;}
    TABLE.ms-selectedtitle TD.ms-vb IMG {display:none;}
</style>
Esquivel answered 3/10, 2010 at 10:21 Comment(2)
Thanks Ryan! I'll try this first thing MondayCirone
I added TABLE.ms-selectedtitle TD.ms-vb IMG {display:none;} to make the mouse over NEW disappear as well. Thanks.Cirone
G
3

You can set the value of days-to-show-new-icon property to 0. However, this affects entire Web site; you cannot do it only for selected lists.

More information: How to stop the !New tag from appearing when you add items to your SharePoint Team Services and SharePoint Services Web site

Guyette answered 1/10, 2010 at 20:13 Comment(4)
Thanks Marek, I thought that would be the case, my request is a bit custom... CheersCirone
@Luke Hutton What do you mean? How does your script work? The SPListItem.SystemUpdate method msdn.microsoft.com/en-us/library/… that allows to update list items without changing the Modified or Modified By fields might help.Guyette
SystemUpdate only allows you to not set modified by/date fields but the New icon is triggered by the Created Date - I guess the OP's sync routine is deleting everything and copying in afresh.Esquivel
My syncing routine does delete everything first and then adds new items to keep it simple, I may look into an Update routine or try Ryan's CSS suggestionCirone

© 2022 - 2024 — McMap. All rights reserved.