Constructing Templates for Cover Pages

To construct a template for a Web Magazine cover page:

  1. Design the template in HTML markup.

    Before creating a template, decide on the page design and break it up into table cells.

    Code example:

    <HTML> 
    <HEAD><TITLE> PeopleTalk: Home Page </TITLE></HEAD>
    <BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
     <TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH="760">
    <!-- Header -->
    <TR><TD height=34>%BIND(:1)</TD></TR>
    <!-- Navigation Bar 1 -->
    <TR><TD height=25 bgcolor=gray>%BIND(:2)</TD></TR>
    </Table>
    
    (code deleted)
    
    <table border="0" cellpadding="0" cellspacing="0" width="760"> 
    <tr><td valign="bottom"> 
    <!-- <a href="/en/new/peopletalk/jun2000/ceo/index.html"> -->
    <IMG SRC="/peoplesoft8/images/webpublishing/PWSYBONQO8C.gif"  
    ALT="Mark Hoffman" width="155" height="217" ALIGN="top" border="0"hspace="0"> 
    <!-- </a>-->
    </td>
      
    <td valign="top" bgcolor="#C6E39E">
           <table border="0" cellpadding="0" cellspacing="0" width="166">
                  <tr valign="top"> 
                  <td>
                          <a href="%BIND(:6)?ICType=Script&ICScriptProgramName=WEBLIB_
    WEBPUB.EO_PE_TEMPLATES.Field
    Formula.IScript_SectionArticleTemplate&PUB=PEOPLETALK&ISSUE=%BIND(:7)&SECTION=
    NEWS">
                          <img src="/peoplesoft8/images/webpublishing/PWS5JA6S59C.gif"
     width="56" height="35" vspa
    ce="0" hspace="3" border="0">
                          </a>
                  </td> 
                  </tr> 
       
                  <tr valign="top">
                  <td>
                       %BIND(:3)  
                  </td> 
                  </tr>  
             </table>
    </td>
    
    <td valign="top" bgcolor="#FFFFCC">
         <a href="%BIND(:6)?ICType=Script&ICScriptProgramName=WEBLIB_WEBPUB.EO_PE_
    TEMPLATES.FieldFormula.IScript_S
    ectionArticleTemplate&PUB=PEOPLETALK&ISSUE=%BIND(:7)&SECTION=INDUSTRY">
         <IMG SRC="/peoplesoft8/images/webpublishing/PWS24J8F44C.gif" ALT="Industry
     Focus" width="439" height="32"
     ALIGN="top" border="0" hspace="0" vspace="Variables.ivspace">  
         </a>
         <table width="100%" border="0" cellspacing="5" cellpadding="0"> 
             <tr valign="top">  
             <font face="Arial, Helvetica, sans-serif" size="1" color="#000066">
             <td>
                       %BIND(:4) 
             </td> 
             </font>
             </tr>  
        </table>
    
    </td>
    </tr>
    </table>
    
    <!-- Footer -->
    <TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH="760">
    <TR> 
    <TD>
    %BIND(:5) 
    </TD>
    </TR>
    </TABLE>
    
    </BODY> 
    </HTML>
    
  2. Place this HTML code within an HTML object in PeopleTools, and save the object.

  3. Add the appropriate BIND parameters to each cell in the HTML object for your template.

  4. Save the HTML object in PeopleTools.

  5. Open the record WEBLIB_WEBPUB in PeopleTools.

  6. Navigate to the record PeopleCode for the field EO_PE_TEMPLATES.

    Edit this PeopleCode as needed.

  7. Call functions to get the values for the bind variables.

    1. Under the function IScript_WebPublishing, add the appropriate functions to bind values to the values that you have set up in your HTML object (the cover page template).

      In the following example, we show how to bind a value to the fourth bind variable. The fourth bind variable in the article template represents the articles for the section INDUSTRY. A function is delivered with Web Magazine feature to get the article listing for a section. This function is called IScript_GetSectionArticles.

    2. From the PeopleCode in IScript_WebPublishing, call the function IScript_GetSectionArticles and set it to a string variable.

      In our example, we set the return value of the function to the variable &IndustryFocus.

      Example:

      rem;
      rem    Get the Articles for the INDUSTRY;
      rem;
      rem    Parameters Values for the Function Call;
      rem    Number   Description      Value
      rem    ---------- -------------------    ---------
      rem    1      Number of Columns    3
      rem    2      FontSize      1
      rem    3      Section Title On    0 (FALSE)
      rem    4      Category Title On    1 (TRUE)
      rem    5      ArticleSummary On   0 (FALSE)
      rem    6      More... On      0 (FALSE)
      rem    7      Section Name      "INDUSTRY"
      rem;
      &IndustryFocus = IScript_GetSectionArticles(3, 1, 0, 1, 0, 0, "INDUSTRY");
      
  8. Bind function values to the HTML object (cover page template).

    Specifically, bind &IndustryFocus into our HTML object (cover page template) using the function GetHTMLText.

    This function takes our HTML object (cover page template), which was saved as EO_PE_FRONTPAGETEMPLATE, and binds the bind values into it. These values must occur in the order in which they were specified in the HTML object. The variable &IndustryFocus is listed fourth because it is the fourth bind variable.

    Example:

    &HTMLText = GetHTMLText(HTML.EO_PE_FRONTPAGETEMPLATE, &HTMLHeader, &HTMLNav1,
     &CompanyNews, &IndustryFocus, &H
    TMLFooter, &articleURL, &sectionURL, IScript_GetImage("PWSH507PO8C"), IScript_Get
    Image("PWSEP6SXO8C"), IScript
    _GetImage("PWSPS3TQO8C"), IScript_GetImage("PWS4MT7QO8C"), IScript_GetImage
    ("PWSTRUTPO8C"), IScript_GetImage("
    PWSPB7CPO8C"), IScript_GetImage("PWSYBONQO8C"), IScript_GetImage("PWS5JA6S59C"),
     IScript_GetImage("PWS24J8F44C
    "));
    
  9. Include the cover page template in the portal.

  10. Repeat the process and bind additional cells within the HTML object (cover page template).

    For each bind value, you can add a function, another HTML object, or static text or images. Continue until all the cells of the HTML object have values.