Relevant Blog Articles Component
The Relevant Blog Articles Component is to show the blog articles which are relevant to the current blog article. This component is used on the Blog Article page.
The Relevant Blog Articles Component is to set links to the relevant blog entries, like below.
The internal links are very important to succeed in SEO. Therefore you have to set a lot of links relevant to current contents.
The source code of Relevant Blog Articles consists of Html code, Server side program, and Style Sheet.
The Html code of the Relevant Blog Articles is below.
This Html code uses the "@cms_page" variable, which is created by the server side program.
The server side program of the Relevant Blog Articles is below.
The goal of this program is to create the "@cms_page" variable, which has relevant articles, by following operations.
Get blog article records from the database by SQL query
At first, get the relevant blog articles by the SQL query.
This query selects the blog articles which has same keyword tags, and order by the number of common tags.
Calculate the url of relevant blog articles
After getting the list of relevant articles by SQL query, set the url for each records.
The Style Sheet of this component is below.
When you change the design of this component, please change the Style Sheet and Html code.