8

Summary

Using page titles as keywords in order to create hyperlinks in associated pages.

Overview

PurposeDevelop PHPServer-side scripting language for web development. procedures to add links to associated pages using keywords in the summary, content and related text.
Goals
  • Add Related text attribute to the Content table to hold manually maintained lists of related pages.
  • Use the Title attribute (as well as Type / Number identifiers) of the Content table to generate a list of keywords.
  • Check each page for the presence of keywords in the Content, Summary and Related text attributes and modify text to add link to the associated page.
  • In addition to the link, add a tool tip that appears on hovering over the keyword that contains the Summary attribute.
TechnologyNo new additions to environment.
ResourcesNone

Implementation

  1. Modify Database Objects

    • FACT_CONTENT - Add Related Text column as well as a unique constraint to the Title column.
    • UPSERT_CONTENT - Modify procedure to update the Related Text and Thumbnail File Name.
    • LKP_CONTENT_TYPE - Add "TECHNOLOGY" to list of types.
  2. Create AutoLink Support Class

    App/Models/Support/AutoLink.php - create AutoLink class to:

    • Create a list of keywords based on the Content Title and the Type / Number identifier columns.
    • Associate with each keyword the link and the Content Summary as the tooltip.
    • Replace each instance of a keyword with the HTML for a link with a tooltip in the Content, Summary and Related text attributes
    • Additionally, convert the Related Text (which is inputted as a comma-delimited list) into an HTML unordered list.
  3. Modify Content Model Class

    App/Models/Content.php - modify Content class to:

    • Incorporate the AuotLink class and use it to augment the results of the getById and getByTypeNumber functions.
    • Add Related Text and Thumbnail File Name to Upsert function
  4. Create Technology Controller Class

    App/Controllers/Technology.php - create Technology class to retrive and display the Technology index as well as individual entries.

  5. Create\Modify View Files

    • App/Views/base.html - Modify base template to include Technology in header.
    • App/Views/Technology/index.html - Create Technology index page.
    • App/Views/Technology/show.html - Create Technology individual entry page.
    • App/Views/Editor/index.html - Modify editor form to include Thumbnail File Name and Related Text.
    • App/Views/?/show.html - Modify Project and Post show files to include Related Content block.
  6. Reorganize Image Directory

    public/images/ - Create technology subdirectory to hold thumbnail images of icons. Create subdirectories for home and post as well.

  7. Modify Base CSS File

    public/css/tbd-base.css - Modify css to hide tooltips and only show on hover.