如何在Sharepoint中重命名列表

时间:2021-01-26 10:48:41

Is it possible to rename a list in Sharepoint 2007 using the web interface? I would like navigation url to change as well.

是否可以使用Web界面在Sharepoint 2007中重命名列表?我希望导航网址也能改变。

I have tried change the name using the settings option on the list. This will change the title but not the navigation url.

我尝试使用列表中的设置选项更改名称。这将更改标题,但不会更改导航网址。

9 个解决方案

#1


I'm not sure that changing the url is possible through the web UI.

我不确定是否可以通过Web UI更改URL。

However, you could probably save the list as a template, include the content as part of that template, and then delete the list. Finally, apply the template to get a newly named (with new url) list.

但是,您可以将列表另存为模板,将内容作为该模板的一部分包含在内,然后删除列表。最后,应用模板以获取新命名的(带有新URL)列表。

#2


I had this same issue and I resolved it easily in SharePoint Designer. You have to go to All Files listing, find the list, right click and Rename. This will change the URL. You won't have this option if you go to the List & Libraries option, you have to go to the All Files one.

我有同样的问题,我在SharePoint Designer中轻松解决了这个问题。您必须转到所有文件列表,找到列表,右键单击并重命名。这将更改URL。如果您转到列表和库选项,则不会有此选项,您必须转到所有文件。

You cannot do this in the Web UI.

您无法在Web UI中执行此操作。

Also, another tip. If you need you have a need to name a list with spaces, but don't want the ugly %20 escape characters in the URL. Say you need to name your list Info Center. First create the list with no space: InfoCenter. Then go back and rename the Title only to Info Center. Now you will have the a nice readable list name, as well as no %20's in your URL.

另外,另一个提示。如果您需要,您需要使用空格命名列表,但不要在URL中使用丑陋的%20转义字符。假设您需要为列表信息中心命名。首先创建没有空格的列表:InfoCenter。然后返回并将标题重命名为Info Center。现在,您将获得一个可读的列表名称,以及URL中的%20。

#3


You can definitely change the URL using SharePoint Designer. I'm quite sure you can also do this programmatically.

您绝对可以使用SharePoint Designer更改URL。我很确定你也可以通过编程方式做到这一点。

#4


The list will get the name you created it with so create the list and then set the localised name afterwards

该列表将获取您创建的名称,因此创建列表,然后设置本地化名称

if (site.Lists.Exists(Constants.MyListName, out myList))
{
    myList.Description = Resources.My_Lists.My_List_Description;
    logger.Write("List {0} already exists on site {1}", Constants.ListNames.MYLIST,site.Url);
}
else
{
    Guid listGuid = site.Lists.Add(Constants.ListNames.MYLIST,   
                    Resources.My_Lists.MyList_List_Description,
                    SPListTemplateType.DocumentLibrary);
    myList = site.Lists.GetList(listGuid, false);
    logger.Write("Created list {0} on site {1}", Constants.ListNames.MYLIST, site.Url);
}
myList.NoCrawl = true;
myList.Title = Resources.My_Lists.My_Inbox_List_DisplayName;
myList.EnableVersioning = true;
myList.EnableMinorVersions = false;
myList.Update();

When you then need the list you get it using the internal Name which will be the same name as in Constants.ListNames.MYLIST

当您需要列表时,您可以使用内部名称获取它,该名称与Constants.ListNames.MYLIST中的名称相同

list = (from SPList l in web.Lists
                        where l.RootFolder.Name.Equals(listInternalName, StringComparison.InvariantCulture)
                        select l).FirstOrDefault();

I think it is a good practice to stay away from the Display name see this article regarding problems with fields in Sharepoint

我认为远离显示名称是一个好习惯,请参阅此文章,了解Sharepoint中字段的问题

http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/

#5


It looks like you can change the url in Windows Explorer. The library/list still exist and can be edited.

看起来您可以在Windows资源管理器中更改URL。库/列表仍然存在且可以编辑。

#6


Sometimes, you start working with a list naming it as Beta list, test, site version 1 etc and then you realize that you need to change the name of the list. Here's the step by step procedure for changing the name:

有时,您开始使用列表将其命名为Beta列表,测试,站点版本1等,然后您意识到您需要更改列表的名称。以下是更改名称的分步过程:

  1. Click "Site Actions" and select "Site Settings"
  2. 点击“网站操作”,然后选择“网站设置”

  3. Under "Site Administration" select "site libraries and lists"
  4. 在“站点管理”下选择“站点库和列表”

  5. Select the list you want to customize
  6. 选择要自定义的列表

  7. Under General Settings select "Title, description and navigation"
  8. 在常规设置下,选择“标题,说明和导航”

  9. Edit the name and you are through.
  10. 编辑名称即可。

This should not modify the hyper connections and various views of the list.

这不应该修改超链接和列表的各种视图。

#7


I'm new to Sharepoint, but I have successfully renamed a list. This is what I did:

我是Sharepoint的新手,但我已经成功重命名了一个列表。这就是我做的:

  • Created a "Network Place", which is actually a WebDAV location for the site
  • 创建了一个“网络位置”,它实际上是该网站的WebDAV位置

  • Renamed the list in Windows Explorer
  • 在Windows资源管理器中重命名该列表

  • Removed/Added the "new" list to the Quick Launch.
  • 删除/添加“新”列表到快速启动。

The URL is changed, as the old name is no longer valid.

URL已更改,因为旧名称不再有效。

Hope it helps.

希望能帮助到你。

#8


The internal name for lists is pretty messy and killing it in code or by manipulating the files may break some custom web parts, workflows, or cause orphaning. For these reasons, I would leave the internal name alone rather than risk causing something to break in the name of vanity. If the client was requesting the change, however, I would save the template as Martin says and use that to rename your list.

列表的内部名称非常混乱,在代码中或通过操作文件来查杀它可能会破坏一些自定义Web部件,工作流或导致孤立。出于这些原因,我会单独留下内部名称,而不是冒着让虚荣名称破坏的风险。但是,如果客户端请求更改,我会像Martin所说的那样保存模板并使用它来重命名列表。

#9


Once you create a list or doc library, the url cannot be changed using the web interface - you're stuck with it unless you modify it using something like Powershell or SharePoint Designer.

创建列表或文档库后,无法使用Web界面更改URL - 除非您使用Powershell或SharePoint Designer等修改它,否则您将无法使用它。

I highly recommend making it a habit to initially create the lists/libraries with a shortened/clean url, then immediately renaming the lists/libraries to its "nice" name for everyone to read clearly.

我强烈建议最初创建一个带有缩短/清除URL的列表/库的习惯,然后立即将列表/库重命名为其“好”名称,以便每个人都能清楚地阅读。

#1


I'm not sure that changing the url is possible through the web UI.

我不确定是否可以通过Web UI更改URL。

However, you could probably save the list as a template, include the content as part of that template, and then delete the list. Finally, apply the template to get a newly named (with new url) list.

但是,您可以将列表另存为模板,将内容作为该模板的一部分包含在内,然后删除列表。最后,应用模板以获取新命名的(带有新URL)列表。

#2


I had this same issue and I resolved it easily in SharePoint Designer. You have to go to All Files listing, find the list, right click and Rename. This will change the URL. You won't have this option if you go to the List & Libraries option, you have to go to the All Files one.

我有同样的问题,我在SharePoint Designer中轻松解决了这个问题。您必须转到所有文件列表,找到列表,右键单击并重命名。这将更改URL。如果您转到列表和库选项,则不会有此选项,您必须转到所有文件。

You cannot do this in the Web UI.

您无法在Web UI中执行此操作。

Also, another tip. If you need you have a need to name a list with spaces, but don't want the ugly %20 escape characters in the URL. Say you need to name your list Info Center. First create the list with no space: InfoCenter. Then go back and rename the Title only to Info Center. Now you will have the a nice readable list name, as well as no %20's in your URL.

另外,另一个提示。如果您需要,您需要使用空格命名列表,但不要在URL中使用丑陋的%20转义字符。假设您需要为列表信息中心命名。首先创建没有空格的列表:InfoCenter。然后返回并将标题重命名为Info Center。现在,您将获得一个可读的列表名称,以及URL中的%20。

#3


You can definitely change the URL using SharePoint Designer. I'm quite sure you can also do this programmatically.

您绝对可以使用SharePoint Designer更改URL。我很确定你也可以通过编程方式做到这一点。

#4


The list will get the name you created it with so create the list and then set the localised name afterwards

该列表将获取您创建的名称,因此创建列表,然后设置本地化名称

if (site.Lists.Exists(Constants.MyListName, out myList))
{
    myList.Description = Resources.My_Lists.My_List_Description;
    logger.Write("List {0} already exists on site {1}", Constants.ListNames.MYLIST,site.Url);
}
else
{
    Guid listGuid = site.Lists.Add(Constants.ListNames.MYLIST,   
                    Resources.My_Lists.MyList_List_Description,
                    SPListTemplateType.DocumentLibrary);
    myList = site.Lists.GetList(listGuid, false);
    logger.Write("Created list {0} on site {1}", Constants.ListNames.MYLIST, site.Url);
}
myList.NoCrawl = true;
myList.Title = Resources.My_Lists.My_Inbox_List_DisplayName;
myList.EnableVersioning = true;
myList.EnableMinorVersions = false;
myList.Update();

When you then need the list you get it using the internal Name which will be the same name as in Constants.ListNames.MYLIST

当您需要列表时,您可以使用内部名称获取它,该名称与Constants.ListNames.MYLIST中的名称相同

list = (from SPList l in web.Lists
                        where l.RootFolder.Name.Equals(listInternalName, StringComparison.InvariantCulture)
                        select l).FirstOrDefault();

I think it is a good practice to stay away from the Display name see this article regarding problems with fields in Sharepoint

我认为远离显示名称是一个好习惯,请参阅此文章,了解Sharepoint中字段的问题

http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/

#5


It looks like you can change the url in Windows Explorer. The library/list still exist and can be edited.

看起来您可以在Windows资源管理器中更改URL。库/列表仍然存在且可以编辑。

#6


Sometimes, you start working with a list naming it as Beta list, test, site version 1 etc and then you realize that you need to change the name of the list. Here's the step by step procedure for changing the name:

有时,您开始使用列表将其命名为Beta列表,测试,站点版本1等,然后您意识到您需要更改列表的名称。以下是更改名称的分步过程:

  1. Click "Site Actions" and select "Site Settings"
  2. 点击“网站操作”,然后选择“网站设置”

  3. Under "Site Administration" select "site libraries and lists"
  4. 在“站点管理”下选择“站点库和列表”

  5. Select the list you want to customize
  6. 选择要自定义的列表

  7. Under General Settings select "Title, description and navigation"
  8. 在常规设置下,选择“标题,说明和导航”

  9. Edit the name and you are through.
  10. 编辑名称即可。

This should not modify the hyper connections and various views of the list.

这不应该修改超链接和列表的各种视图。

#7


I'm new to Sharepoint, but I have successfully renamed a list. This is what I did:

我是Sharepoint的新手,但我已经成功重命名了一个列表。这就是我做的:

  • Created a "Network Place", which is actually a WebDAV location for the site
  • 创建了一个“网络位置”,它实际上是该网站的WebDAV位置

  • Renamed the list in Windows Explorer
  • 在Windows资源管理器中重命名该列表

  • Removed/Added the "new" list to the Quick Launch.
  • 删除/添加“新”列表到快速启动。

The URL is changed, as the old name is no longer valid.

URL已更改,因为旧名称不再有效。

Hope it helps.

希望能帮助到你。

#8


The internal name for lists is pretty messy and killing it in code or by manipulating the files may break some custom web parts, workflows, or cause orphaning. For these reasons, I would leave the internal name alone rather than risk causing something to break in the name of vanity. If the client was requesting the change, however, I would save the template as Martin says and use that to rename your list.

列表的内部名称非常混乱,在代码中或通过操作文件来查杀它可能会破坏一些自定义Web部件,工作流或导致孤立。出于这些原因,我会单独留下内部名称,而不是冒着让虚荣名称破坏的风险。但是,如果客户端请求更改,我会像Martin所说的那样保存模板并使用它来重命名列表。

#9


Once you create a list or doc library, the url cannot be changed using the web interface - you're stuck with it unless you modify it using something like Powershell or SharePoint Designer.

创建列表或文档库后,无法使用Web界面更改URL - 除非您使用Powershell或SharePoint Designer等修改它,否则您将无法使用它。

I highly recommend making it a habit to initially create the lists/libraries with a shortened/clean url, then immediately renaming the lists/libraries to its "nice" name for everyone to read clearly.

我强烈建议最初创建一个带有缩短/清除URL的列表/库的习惯,然后立即将列表/库重命名为其“好”名称,以便每个人都能清楚地阅读。