Create the Content Type for Site Page Text

For a content type, you specify a name, required field values, a default content layout for the type.

  • Type name

    Specify any valid content type name.

  • Fields

    The following fields are required.

    Field Name Field Type Number of data field values Description
    site Text Single Site name
    pageid Text Single Page ID
    pagename Text Single Page name
    pageurl Text Single Page URL
    pagedescription Text Single Page description
    keywords Text Multiple (no max) All text on the page and the values from all text fields of content items on the page, obtained by the Content Toolkit index-site command
    {{#fields}}
    <div class="indextype"></div>
    <div>
        <a href="{{pageFullURL}}" title="{{pagename}}">{{pagename}}</a>
    </div>
    {{/fields}}
    
    content.fields.pageFullURL = SCSRenderAPI.getSitePrefix() + content.fields.pageurl;
  • Create a content layout for the type.

    The content layout should display the site name and the URL to navigate to the page. For example, in layout.html:

    {{#fields}}
    <div class="indextype"></div>
    <div>    
       <a href="{{pageFullURL}}"title="
    {{pagename}}">{{pagename}}</a>
    </div>
    {{/fields}}
  • In render.js, generate the page full URL:

    content.fields.pageFullURL =
    SCSRenderAPI.getSitePrefix() + 
    content.fields.pageurl;
  • Set the content layout as the default content layout for the type.

    content.fields.pageFullURL = 
    SCSRenderAPI.getSitePrefix() + content.fields.pageurl;