Publication

This section discusses:

  • IScript_BuildPubHeader

  • IScript_BuildPubNavBar

  • IScript_BuildPubFooter

  • IScript_WebPublishing

Syntax

IScript_BuildPubHeader()

Description

IScript_BuildPubHeader displays the web magazine header for a publication. It uses the publication ID and the issue ID that are passed through the query string. This function then retrieves the current issue name using these parameters and displays it in the header. It's displayed by passing the issue name as a bind variable to the HTML Header Template. Different publications must change the code to call their specific HTML templates for the header.

The declaration is:

Declare Function IScript_BuildPubHeader PeopleCode WEBLIB_WEBPUB.EO_PE_PUB Fiel
dFormula;

Parameters

Function Call Parameters: None.

This table lists the Query String Parameters:

Parameter

Description

PUB

The publication ID is set in the query string by PUB=Publication ID.

The function must have this query string parameter to retrieve the correct values from the database. This value is retrieved in the function and set to the variable &Publication.

ISSUE

The issue ID is set in the query string by ISSUE=Issue ID.

The function must have this query string parameter to retrieve the correct values from the database. This value is retrieved in the function and set to the variable &Issue.

This table lists Other Parameters:

Parameter

Description

HTML.HTML Template

This HTML template is required to display the header for the Web Magazine page. Change this in the code to use the HTML template that you designed.

Returns

Returns the HTML markup for the entire publication or issue header.

Example

&HTMLHeader = IScript_BuildPubHeader();

Syntax

IScript_BuildPubNavBar()

Description

IScript_BuildPubNavBar displays the Web magazine navigation bar for a publication. This function retrieves the HTML template for the navigation bar for the publication. The inputs are publication, issue name, and full URL from the %Request parameter. Different publications must change the code to call their specific HTML templates for the navigation bar.

The declaration is:

Declare Function IScript_BuildPubNavBar PeopleCode WEBLIB_WEBPUB.EO_PE_PUB Fiel
dFormula;

Parameters

Function Call Parameters: None.

This table lists the Query String Parameters:

Parameter

Description

PUB

The publication ID is set in the query string by PUB=Publication ID.

The function must have this query string parameter to retrieve the correct values from the database. This value is retrieved in the function and set to the variable &Publication.

ISSUE

The issue ID is set in the query string by ISSUE=Issue ID.

The function must have this query string parameter to retrieve the correct values from the database. This value is retrieved in the function and set to the variable &Issue.

This table lists Other Parameter:

Parameter

Description

HTML. HTML Template

This HTML template is required to display the publication navigation bar for the Web Magazine page. Change this in the code to use the HTML template that you designed.

URL

This is the URL from the %Request. This must be an absolute URL, in the following format:

Scheme://host:port/path/

For example: http://localhost:8080/servlets/iclientservlet/HR

Note: HR is a subdirectory.

Returns

Returns the HTML markup for the entire publication navigation bar.

Example

&HTMLNav1 = IScript_BuildPubNavBar();

Syntax

IScript_BuildPubFooter()

Description

IScript_BuildPubFooter displays the Web magazine footer for publication. It retrieves the HTML template of the footer for that publication. This is a static HTML template that does not have any bind variables. For different publications, the code must be changed to call the specific HTML template for the footer.

The declaration is:

Declare Function IScript_BuildPubFooter PeopleCode WEBLIB_WEBPUB.EO_PE_PUB Fiel
dFormula;

Parameters

Function Call Parameters: None.

Query String Parameters: None.

This table lists the Other Parameters:

Parameter

Description

HTML. HTML Template

This HTML template is required to display the footer for the Web Magazine page. Change this in the code to use the HTML template that you designed.

Returns

Returns the HTML markup for the entire publication footer.

Example

&HTMLFooter = IScript_BuildPubFooter();

Syntax

GenerateScriptPortalURL(%Portal, %Node ,  Record.WEBLIB_WEBPUB, Field.EO_PE_TEMPLATES, "FieldFormula", "IScript_WebPublishing");

GenerateScriptPortalURL can be used with this function as part of the syntax, but generally the syntax for this iScript is the following:

IScript_WebPublishing()

Description

IScript_WebPublishing assembles the Web magazine for a publication issue. It uses the publication built-in functions iScripts described previously to produce each value that is required by the cover page template. It is assembled by passing all required parameters as bind variables to the HTML Front Page template.

Customized cover page layouts require changes to the code. For example, if the HTML template has six bind variables; IScript_WebPublishing must pass six values, including HTML markup returned by other publication built-in functions, to match. Using examples from previous sections, we have:

&HTMLText = GenerateHTMLText(HTML.EO_PE_FRONTPAGETEMPLATE, &HTMLHeader, &HTMLNav1,
 &CompanyNews, &Indu
stryFocus, &HMLFooter, &ArticleURL, &SectionURL,
IScript_GetImage("PWSH507PO8C"), IScript_GetImage("PWSEP6SXO8C")
IScript_GetImage("PWSPS3TQO8C"), IScript_GetImage("PWS4MT7QO8C"),
IScript_GetImage("PWSTRUTPO8C"), IScript_GetImage("PWSPB7CPO8C"),
IScript_GetImage("PWSYBONQO8C"), IScript_GetImage("PWS5JA6S59C"),
IScript_GetImage("PWS24J8F44C"));

where:

  • EO_PE_FRONTPAGETEMPLATE is the cover page layout.

  • &HTMLHeader, &HTMLNav1, and &HTMLFooter contain the HTML markup for the header, navigation, and footer portions of the layout.

  • &CompanyNews contains the HTML markup for articles for the news section.

  • &IndustryFocus contains the HTML markup for articles for the industry section.

  • &articleURL is the portal content URL for article template pages.

  • &sectionURL is the portal content URL for section template pages.

  • IScript_GetImage() calls are used to build HTML IMG tags for graphics on the page.

Returns

Returns the HTML markup for the entire publication issue.

Example

<a href=http://host:port/psp/ps/EMPLOYEE/PSFT_PA/s/WEBLIB_WEBPUB.EO_PE_
TEMPLATES.FieldFormula.IScript_
WebPublishing?PUB=PEOPLETALK&ISSUE=JUNAUG2000>PeopleTalk</a>