Search code examples
sharepointwss-3.0spsitesplist

SPList and SPSite name - different screen and file name - is it possible?


Is there a possibility to have different list or site display name (on screen) than the file name? I mean to display other name in left quick launch bar than the file names itself? For example I would name list like A on screen, and call it in my custom webpart like B.

Thanks in advance for help!


Solution

    • SPWebs and SPLists can have their titles changed in their respective settings page on the site.
    • SPWebs and SPLists can have their internal names (like seen in the url) renamed in SharePoint Designer, or by code.

    When you do a SPWeb.Lists["Listname"] it looks for the Title of the list. If your title is full of special characters or something else is demanding you to be able to have a simpler name to grab the list, I recommend doing it by the Id of the SPWeb or SPList, their collections generally accept a GUID as parameters, and if they don't there's a method for that.