-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DeleteTopNavigationNodesDefinition / DeleteQuickLaunchNavigationNodesDefinition to delete navigation nodes #804
Comments
Because the IsVisible property does not work as expected because of a SharePoint bug, an easy way to remove Navigation nodes by Title or Url match would be a modification of QuickLaunchNavigationNodeModelHandler: Instead of setting the IsVisible property to false, we could remove the navigation node. |
Thanks for the input, @markusjenni. We'll go with a new definition similar to DeleteWebPartsDefinition. The goal is to separate deleting operation avoiding mixing up creation / update process and potential data losses. M2 always creates or updates stuff, deleting is extremely rare. |
As IsVisible property does not work properly due to SharePoint bug, a workaround should be considered:
|
…nNodesDefinition to delete navigation nodes #804 Passed the following tests for CSOM/SSOM: + CanDeployRandom_DeleteTopNavigationNodesDefinition + CanDeploy_DeleteTopNavigationNodes_ByTitle + CanDeploy_DeleteTopNavigationNodes_ByUrl + CanDeploy_DeleteTopNavigationNodes_ByTitleAndUrl + CanDeployRandom_DeleteQuickLaunchNavigationNodesDefinition + CanDeploy_DeleteQuickLaunchNavigationNodes_ByTitle + CanDeploy_DeleteQuickLaunchNavigationNodes_ByUrl + CanDeploy_DeleteQuickLaunchNavigationNodes_ByTitleAndUrl
Added DeleteTopNavigationNodesDefinition / DeleteQuickLaunchNavigationNodesDefinition.
|
Hi |
Upcoming 1.2.70 |
Cool, when do you think it will be published? |
Over the weekend or Monday. Testing internally. What are the scenarios you are looking for? |
Just want to hide/remove some OOTB navigation from Quick lunch and as the rest of project is on SPMeta2 don't want to use CSOM. |
Hi again. I've tested DeleteQuickLaunchNavigationNodesDefinition class with my scenario from your dev branch and it's working fine. I removed all OOTB navigation and added new ones. just waiting for a published version (1.2.7) |
Thanks @babakb, appreciate your feedback. Curious on the particular OOTB nodes in your scenarios. What are they? Would you please provide more context, so that we would add this case in the regression tests as well. Next, we aren't sure how to get the right deleting experience for the 2nd/3rd navigation nodes. Current implementation works well for the 1st level only. Guess, will leave it as it is for the time being until the community asks for more cases. 1.2.7 is being tested, delaying. Current dev is stable for both CSOM/SSOM. |
I'm using it for project sites on project online. they have a few default navigation (Notebook-Documents-Tasks-Calendar-Projects-Project details) which in our scenario should be removed. they are all 1st level navigation nodes. Just as a sample : static DeleteQuickLaunchNavigationNodesDefinition OOTBNotebook = new DeleteQuickLaunchNavigationNodesDefinition var projectWebModel = SPMeta2Model.NewWebModel(web => |
Right, makes perfect sense. Thank you for sharing that. |
Any update on publishing version 1.2.7? |
M2 should be able to hide / delete quick and top navigation nodes based on criteria:
This feature was highly desired by the community. Should be implemented in the first place.
The text was updated successfully, but these errors were encountered: