+

Search Tips   |   Advanced Search

Scripting for static pages

We can work with static portal pages using the Portal Scripting Interface, which enables us to use administration function through the Jacl scripting language.


Including a static page in the portal

To include a static page in the portal, use the following JACL command:

Example: $Content create staticpage MyStaticPageTitle html c:/tmp/StaticContentPage.zip hcl294.html inline select

This creates a static page underneath the currently selected content node for the html markup with the page title MyStaticPageTitle. The content of the page is read from the file c:/tmp/StaticContentPage.zip, and the entry point for the page display is read from the file hcl294.html, which needs to be contained in the compressed file. To specify the display method, we can use the optional parameter displayoption. It takes one of the values inline, iframe, or ajax. The default value is inline. To make the newly created static page the currently selected content node, use the optional parameter select


Get the static page content as a compressed file

To get a static page content in the format of a compressed file, use the following JACL command:

Example: $Content pageget 6_CGAH47L00G2N802TJFV58Q3000 html c:/tmp/MyStaticContentPage.zip

This writes the content of the specified static page to the compressed file c:/tmp/MyStaticContentPage.zip.


Set the static page content by specifying a compressed filename

To set the static page content by specifying a compressed filename, use the following JACL command:

Example: $Content pageset 6_CGAH47L00G2N802TJFV58Q3000 html c:/tmp/NewStaticContentPage.zip hcl294.html

This updates the specified static page content with the content of the compressed file c:/tmp/NewStaticContentPage.zip. The entry point for the page display is read from the file hcl294.html. This file needs to be contained in the compressed file.


Getting attributes of a static page

To get attributes of a static page, use the following command:

Example: $Content get 6_CGAH47L00G2N802TJFV58Q3000 filename html

This returns the filename of the entry point for the page display, that is hcl294.html for the specified markup.


Set attributes of a static page

To set attributes for a static page, use the following command:

Example 1: $Content set 6_CGAH47L00G2N802TJFV58Q3000 filename anotherhcl294.html html

This sets the entry point for the page display to anotherhcl294.html for the specified markup.

Example 2: $Content set 6_CGAH47L00G2N802TJFV58Q3000 displayoption iframe html

This sets the display option to iframe for the specified markup. Valid display option settings are inline, iframe, and ajax.


Delete a static page

The command for deleting a static page is the same as for deleting a standard portal page. We can use the command: $Content delete oid

To delete a static page, use the following command:

Example: $Content delete 6_CGAH47L00G2N802TJFV58Q3000 Related information