Skip to content
CBPSC edited this page Feb 16, 2017 · 11 revisions

get-page

Retrieves details about the specified page

Parameters
--name
--id
--parentid

  • name

  • Type: String

  • Description: The name (not title) of the page.

  • id

  • Type: Integer

  • Required: Yes

  • Description: Explicitly specifies the Page ID to retrieve. Use of the flag is not required. You can simply provide the ID value as the first argument.

  • parentid

  • Type: Integer

  • Required: Yes

  • Description: The Page/Tab ID of the page's parent in the page hierarchy

Example usages:

  • "get-page" - Gets info on the current page
  • "get-page 72" - Gets info on the page with pageid 72
  • "get-page --name "Home"" - Gets info on the page with the name "Home"
  • "get-page --name "Page 1a" --parentid 72" - Gets info on the page named "Page 1a" who has a parent page with the id of 72

list-pages

Retrieves a list of pages based on the specified criteria

DNN Prompt List-Pages Command

Parameters
--deleted
--visible
--partentid
--name
--title
--skin
--path

  • deleted

  • Type: Boolean

  • Required: No

  • Description: If true, only pages that have been deleted (i.e. in DNN's Recycle Bin) will be returned. If false then only pages that have not been deleted will be returned. If the flag is specified but has no value, then true is assumed. If the flag is not specified, both deleted and non-deleted pages will be returned.

  • visible

  • Type: Boolean

  • Required: No

  • Description: If true, only pages that are visible in the navigation menu will be returned. If false then only pages that hidden will be returned. If the flag is specified but has no value, then true is assumed. If the flag is not specified, both visible and hidden pages will be returned.

  • parentid

  • Type: Integer

  • Required: No

  • Description: The Page ID (Tab ID) of the parent page whose child pages you'd like to retrieve. If the first argument is a valid Page ID, you do not need to explicitly use the --parentid flag

  • name

  • Type: String

  • Required: No

  • Description: Retrieve only pages whose name matches the expression. Can use the asterisk wildcard (*) to match 0 or more characters.

  • title

  • Type: String

  • Required: No

  • Description: Retrieve only pages whose title matches the expression. Can use the asterisk wildcard (*) to match 0 or more characters.

  • skin

  • Type: String

  • Required: No

  • Description: Retrieve only pages whose skin matches the expression. Can use the asterisk wildcard (*) to match 0 or more characters.

  • path

  • Type: String

  • Required: No

  • Description: Retrieve only pages whose path matches the expression. Can use the asterisk wildcard (*) to match 0 or more characters.

Example usages:

  • "list-pages" - Lists all pages in current portal
  • "list-pages 43" - Lists info on the page with pageid of 43
  • "list-pages --parentid 43" - Lists info about child pages of a parent page with the id of 43
  • "list-pages --deleted" - Lists all pages in the Recycle Bin
  • "list-pages --path //Admin//Management" - Lists all "Management" pages in the Admin menu

new-page

Creates a new page within the portal based on specified criteria

Parameters
--name
--title
--url
--parentid
--description
--keywords
--visible

  • name

  • Type: String

  • Required: Yes

  • Description: The name to use for the page. The --name flag does not have to be explicitly declared if the first argument is a string and not a flag.

  • title

  • Type: String

  • Required: No

  • Description: The display title for the page.

  • url

  • Type: String

  • Required: No

  • Description: A custom URL to use for the page. If not specified, the --name is used by DNN when creating the URL

  • parentid

  • Type: Integer

  • Required: No

  • Description: If you want this to be the child of a page, specify that page's ID as the --parentid

  • description

  • Type: String

  • Required: No

  • Description: The description to use for the page.

  • keywords

  • Type: String

  • Required: No

  • Description: Keywords to use for the page.

  • visible

  • Type: Boolean

  • Required: No

  • Description: If true, the page will be visible in the site's navigation menu.

Example usage(s):

  • "new-page "My New Page" - Creates a new page named "My New Page" by implicitly using the --name parameter.
  • "new-page --name "My New Page" --title "Prompt's Page Title" --keywords "Prompt, DNN, DotNetNuke" - Creates a new page named "My New Page" with keywords "Prompt, DNN, & DotNetNuke"

set-page

Sets or updates properties of the specified page

Parameters
--id
--name
--title
--url
--parentid
--description
--keywords
--visible

  • id

  • Type: Integer

  • Required: No

  • Default: Current Page Id

  • Description: The ID of the page you want to update. If not specified, the command will operate on the current page.

  • name

  • Type: String

  • Required: No

  • Description: The name to use for the page.

  • title

  • Type: String

  • Required: No

  • Description: The display title for the page.

  • url

  • Type: String

  • Required: No

  • Description: A custom URL to use for the page. If not specified, the --name is used by DNN when creating the URL

  • parentid

  • Type: String

  • Required: No

  • Description: If you want this to be the child of a page, specify that page's ID as the --parentid

  • description

  • Type: String

  • Required: No

  • Description: The description to use for the page

  • keywords

  • Type: String

  • Required: No

  • Description: Keywords to use for the page

  • visible

  • Type: Boolean

  • Required: No

  • Description: If true, the page will be visible in the site's navigation menu

Example usage(s):

  • "set-page --title "My New Page Title" --name LandingPage1" - Updates properties on current page
  • "set-page --id 72 --parentid 79" - Changes the parent of a page

delete-page

Sends a page to the DNN Recycle Bin

Parameters
--id
--parentid

  • id

  • Type: Integer

  • Required: Yes

  • Description: Explicitly specifies the Page ID to delete. Use of the flag name is not required. You can simply provide the ID value as the first argument. Required if --parentid is not specified.

  • parentid

  • Type: Integer

  • Required: See Description

  • Description: When you want to delete all child pages of a certain page, use this flag and specify the parent's Page ID. Required if --id is not specified.

Example usage(s):

  • "delete-page 987" - Deletes page with the page id of 987
  • "delete-page --parentid 987" - Deletes all first-level of children of the page with pageid 987.

Note: At this time, Prompt will not allow you to delete any pages that have children.


restore-page

Recovers a page from the DNN Recycle Bin

Parameters
--id
--name
--parentid

  • id

  • Type: String

  • Required: See notes

  • Description: Explicitly specifies the Page ID to delete. Use of the flag name is not required. You can simply provide the ID value as the first argument. Required if --parentid and --name are not specified.

  • name

  • Type: String

  • Required: See notes

  • Description: Specifies the name (not title) of the page that should be restored. This can be combined with --parentid to target a page name with a specific Parent page. Required if --parentid and --name are not specified.

  • parentid

  • Type: String

  • Required: See notes

  • Description: When you want to restore all child pages of a certain page, use this flag and specify the parent's Page ID. Required if --id and --name are not specified.

Example usage(s): *"restore-page 999" - Restores the page with pageid 999
*"restore-page --name "Page1"" - Restores the page with the name of "Page1" *"restore-page --parentid 999" - Restores all pages with the common parent page that has the pageid of 999


purge-page

Permanently deletes a page from the DNN Recycle Bin

Parameters
--id
--name
--parentid

  • id

  • Type: String

  • Required: See notes

  • Description: Explicitly specifies the Page ID to delete. Use of the flag name is not required. You can simply provide the ID value as the first argument. Required if --parentid and --name are not specified.

  • name

  • Type: String

  • Required: See notes

  • Description: Specifies the name (not title) of the page that should be restored. This can be combined with --parentid to target a page name with a specific Parent page. Required if --parentid and --name are not specified.

  • parentid

  • Type: String

  • Required: See notes

  • Description: When you want to restore all child pages of a certain page, use this flag and specify the parent's Page ID. Required if --id and --name are not specified.

Example usage(s):
*"purge-page 999" - Permanently removes the page with pageid 999
*"purge-page --name "Page1"" - Permanently removes the page with the name of "Page1" *"purge-page --parentid 999" - Permanently removes all pages with the common parent page that has the pageid of 999

Clone this wiki locally