3

enter image description hereWhen you create a new List, the default to include in Quick Launch is YES, which causes "LISTS" to appear in the left navigation. You have to go back and change it to NO. If we want LISTS to not appear in their left navigation/quick launch, can we just make the default NO?

  1. Is it possible to set default No using OOTB?
  2. If not how can we achieve this using custom solutions.

I have come across the solution to entirely hide the Quick Launch. But that is not what I want.

tried using javascript but it is not working. i am assuming that the page uses v4 master page;so wrote it on v4.

$(document).ready(function () {
    debugger;
    var no = document.getElementById("onetidDisplayOnLeftNo")
    if (no != null) {
        $("#onetidDisplayOnLeftNo").attr("checked", "checked");
        $("#onetidDisplayOnLeftYes").attr("checked", " ");
3
  • The version is 2010 with sp1
    – Deepika
    May 18, 2015 at 12:37
  • do you mean you want to hide items under " Recent " tab of quick launch? May 18, 2015 at 12:42
  • no; When we create a list, I want the default option to be "no" in"display this list on quick launch" under navigation. Added screen for better understanding.
    – Deepika
    May 18, 2015 at 12:54

3 Answers 3

3

In reality what happens if you create for instance a list named Tasks, is that two extra navigation items are added to quick launch navigation: a header labeled Lists, and a child of it named Tasks.

To answer your points

  1. Is it possible to set default No using OOTB?

If you're in control of the list template used for the list (so it's a custom list definition), you can try using the OnQuickLaunch attribute available on ListTemplate

If you mean to override the default setting for OOB lists, answer is no. The easiest solution for that would be to inject some JavaScript in the list creation page to click 'No' by default instead.

  1. If not how can we achieve this using custom solution

Updated: JavaScript can't be used in this case, because the page uses a Silverlight component by default

JavaScript approach could be quite easy to achieve.

The solution requires a Web EventReceiver that hooks ListAdding event, and changes the behavior by setting OnQuickLaunch property on the list to false.
Working with ListAdding and ListDeleting Events

2
  • I tried using javascipt; wrote it on v4 master page. but somehow could not capture the id of radio button. Further to add, I was not able to select the radio button using developer tools. I am using IE11.Added the script in question.
    – Deepika
    May 18, 2015 at 14:17
  • 1
    right, this is one of the few places where Silverlight was used instead. By default will try to show the Silverlight version of this page, and JS isn't an option then. I'll update my answer May 18, 2015 at 16:58
2

You can add an Event Receiver with following event you can set OnQuickLaunch=false so for every list you create the ER will be executed and you can hide list through it

 public override void ListAdding(SPListEventProperties properties)
 {
            properties.List.OnQuickLaunch = false;
 }
0
  1. This is not posible OOTB. Only way you can check this "No" while creating a list or library, just press "More Options" button:

enter image description here

When you Name your list and select that option to show in the left navigation, so you don't need to go to List or Library settings to change it after creation.

1
  • I want the default behaviour to be selected as "No" so that if user creates a list without going to more options the list does not shows up in the quick launch
    – Deepika
    May 18, 2015 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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