Relevant Contents component
The Relevant Contents Component is alternative one of the Blog Posts for Contents and other recommendation widget. This component calculate the relevant pages by theme analysis database.
The Relevant Contents Component is to show the recommendation links on the widget.
This component uses the Keyword Theme data of the Content Management System.
The Relevant Contents Component consists of Html code, server side program, and Style Sheet.
The Html code of the Relevant Contents Component is below.
The Html code uses the "@cms_page" variable to generate the list of relevant contents. This variable is generated by the server side program.
The server side program of the Relevant Contents Component is below.
The "@cms_page" variable are created by following operations.
Set threshold of the relevance value
At first, set the threshold value of the relevance by setting the "$limitValue" variable. The relevance score is used in Page Relevance score of the CMS function.
Get Relevant Contents from database by SQL query
Query in SQL to get pages which has greater relevance score than the value. The wmc_theme_similarity table has the score, and the score have to be calculated.
Set url and title
After getting relevant page records, set the url and title of each page.
The Style Sheet of the Relevant Contents Component is below.
When you change the design, please change the Style Sheet and the Html code.