Blog Tags Component
The Blog Tags Component shows the keyword tags with links to the page, which the current page has. The most important keyword tag is used in creating bread list, therefore it shows keyword tags except it.
The blog Tags Component is used on the Blog Article Page.
This component shows the tags of the article.
The links to the tag page has following 2 types.
- Link to the main content page
- Link to the keyword tag page
The icons of the tags differ by these types.
The source code of the Blog Tags Component consists of Html code, Server side program, and Style Sheet.
The Html code of the Blog Tags Component is below.
The Html code uses the "@cms_tag_page" variable. It has information about the keyword tags of this page. The server side program make it.
The icons of the links has 2 types. The links to the main contents and the links to the tag page. The case statement using "alns:if" attribute decide which icon to use.
The server side program of the Blog Tags Component is below.
The server side program makes the "@cms_tag_page" variable by following operations.
Get keyword tags of current page by SQL query
Get keyword tags except the most important keyword tag of this page by SQL query. The offset is 1 because the first tag is the most important one which has biggest weight value.
Exclude tag used in Bread List
Trim the tag which is used as the bread list.
Set url of the keyword tag page if exists
Set url to each keyword tag by using the "getUrl()" function.
The Style Sheet of the Blog Tags Component is below.
This component uses following image icon. This icon is for main content links.