forked from pnp/cli-microsoft365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the 'spo navigation node add' command solving pnp#521
- Loading branch information
1 parent
aa92ac1
commit f0cf146
Showing
6 changed files
with
648 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
docs/manual/docs/cmd/spo/navigation/navigation-node-add.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# spo navigation node add | ||
|
||
Adds a navigation node to the specified site navigation | ||
|
||
## Usage | ||
|
||
```sh | ||
spo navigation node add [options] | ||
``` | ||
|
||
## Options | ||
|
||
Option|Description | ||
------|----------- | ||
`--help`|output usage information | ||
`-u, --webUrl <webUrl>`|Absolute URL of the site to which navigation should be modified | ||
`-l, --location <location>`|Navigation type where the node should be added. Available options: `QuickLaunch`, `TopNavigationBar` | ||
`-t, --title <title>`|Navigation node title | ||
`--url <url>`|Navigation node URL | ||
`--isExternal`|Set, if the navigation node points to an external URL | ||
`-o, --output [output]`|Output type. `json|text`. Default `text` | ||
`--verbose`|Runs command with verbose logging | ||
`--debug`|Runs command with debug logging | ||
|
||
!!! important | ||
Before using this command, connect to a SharePoint Online site, using the [spo connect](../connect.md) command. | ||
|
||
## Remarks | ||
|
||
To add a navigation node to a site, you have to first connect to a SharePoint Online site using the [spo connect](../connect.md) command, eg. `spo connect https://contoso.sharepoint.com`. | ||
|
||
## Examples | ||
|
||
Add a navigation node pointing to a SharePoint page to the top navigation | ||
|
||
```sh | ||
spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location TopNavigationBar --title About --url /sites/team-s/sitepages/about.aspx | ||
``` | ||
|
||
Add a navigation node pointing to an external page to the quick launch | ||
|
||
```sh | ||
spo navigation node add --webUrl https://contoso.sharepoint.com/sites/team-a --location QuickLaunch --title "About us" --url https://contoso.com/about-us --isExternal | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.