Child Tags Component
The Child Tags Component shows the all child tags of current tag page. This component makes effective internal links to the tag pages.
The Child Tags Component is used on the template of the Keyword Tag Page. This component shows the child tags of the tag of current page like below.
By using this component, the keyword tags page can connect to the relevant tags. The keyword tag pages are marked as "noindex, follow", and they is evaluated.
To keep the quality of contents and links of no-index pages is effective to make the quality of website better.
The Child Tags Component consists of Html code, server side program, Style Sheet, and image resource.
The Html code of the Child Tags Component is below.
This code is shown when the current page's tag has child tags. The "$size" variable is the number of the children.
The "$cms_tag" variable is the records of the child tags, which is created in the server side program.
The server side program of the Child Tags Component is below.
The main goal of this program is to create the "$cms_tag" variable by following operations.
Get tag of the current page
At first, get current keyword tag by SQL query. And make variables to get child tags from the current tag record.
Get child tags by SQL query
Get the child tags by SQL query by using tree path. The keyword tags have tree structure, and it is implemented by the path string.
Set url to the child tags
The default records after fetched from the database do not have url. Therefore calculate the url if the keyword tag has representing page.
The Style Sheet of the Child Tags Component is below.
When you change the design of this component, change this Style Sheet and Html code.
The image resource of the Child Tags Component is below.
This image is used in the Html code. If you want to change the icon of the tags, upload your own image, and change the Html code.