posted time Created time: 2015-07-10 posted time Last updated time:

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.

Appearance and usage of the Relevant Contents Component

The Relevant Contents Component is to show the recommendation links on the widget.

recommend links

This component uses the Keyword Theme data of the Content Management System.

Source code of the Relevant Contents Component

The Relevant Contents Component consists of Html code, server side program, and Style Sheet.

Html code

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.

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.

If you do not calculate the score, please update it from the Keyword Balance and Analyse page theme page before publish the page.

Set url and title

After getting relevant page records, set the url and title of each page.

Style Sheet

The Style Sheet of the Relevant Contents Component is below.

When you change the design, please change the Style Sheet and the Html code.


Go to Top