Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a question about the OnQuickLaunch property in SharePoint 2013. I've created a new SharePoint 2013 project in Visual Studio with a document library List instance in it. All I have is an elements.xml that looks like this.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="List" 
            OnQuickLaunch="TRUE" 
            TemplateType="101" 
            FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" 
            Url="Lists/List" 
            Description="My List Instance">
  </ListInstance>
</Elements>

I've set the OnQuickLaunch property to true but if I deploy my solution, the list isn't on the quick launch.

Is this a bug in SharePoint 2013, or am I doing something wrong?

share|improve this question
add comment

1 Answer 1

Sorry for posting this as an answer, but I can't post replies yet. :(

I have the exact same problem, only some lists appear under the "Recent" node. I too declare the list to appear on the quick launch the same way, but when I check the list settings the "Display this list on the Quick Launch?" setting is set to no.

I think this behavior is new to SP2013, since I can't remember ever having this problem before.

If someone has a quick fix I'm all ears. Otherwize I guess there are some not-so-good solutions, such as adding a list event receiver for the ListAdded event and setting the property through code. Quite a hassle for something that should just work though.

EDIT:

Actually I think I have an answer now.

Speaking with a colleague of mine, he had the same problem a short while ago. He found that adding the list instance in the onet.xml instead of using a list instance did the trick. Because when adding list instances in the onet, SharePoint uses a different kind of element which has the "QuickLaunchHeading" attribute. This attribute is not present in the ListInstance element. So in the configuration element, you could add lists like so:

    <Lists>
        <List Title="MyList"
              Type="101"
              Url="MyUrl"
              FeatureId="MyFeatureId"
              OnQuickLaunch="TRUE"
              QuickLaunchHeading="TRUE"/>
    </Lists>

There are some drawbacks to this though. You cannot be sure of the order in which stuff is provisioned, so you cannot activate a feature which is depending on the list. Just to clarify I haven't tried this yet, so my answer may not be 100% complete, but I will try it soon though. :)

share|improve this answer
1  
Thanks for your tip about the onet.xml. Unfortunately I wasn't able to use an onet.xml in my case. :( –  Marlou Mar 7 '13 at 15:57
1  
As it turned out, neither was I. My guess is that it is a new bug for SP2013, or simply a bad decision on Microsofts part. We ended up setting the property in code in a feature receiver after the list was created. –  Johannes Mar 22 '13 at 10:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.