Automatic HyperlinksUsing Keywords to Automatically Create Hyperlinks |
8
Summary
Using page titles as keywords in order to create hyperlinks in associated pages.
Overview
Purpose | Develop PHPServer-side scripting language for web development. procedures to add links to associated pages using keywords in the summary, content and related text. |
Goals |
|
Technology | No new additions to environment. |
Resources | None |
Implementation
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.
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.
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
Create Technology Controller Class
App/Controllers/Technology.php - create Technology class to retrive and display the Technology index as well as individual entries.
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.
Reorganize Image Directory
public/images/ - Create technology subdirectory to hold thumbnail images of icons. Create subdirectories for home and post as well.
Modify Base CSS File
public/css/tbd-base.css - Modify css to hide tooltips and only show on hover.