Home > CMS Tutorial > Empire CMS > body text

How Imperial CMS achieves the click effect of search keywords

silencement
Release: 2019-11-26 14:43:13
forward
1970 people have browsed it

How Imperial CMS achieves the click effect of search keywords

The example of this article describes the method of Imperial CMS to achieve the click effect of search keywords. Share it with everyone for your reference. The specific implementation method is as follows:

1. Create a custom JS template: The template content is as follows:

The code is as follows:

[!--empirenews.listtemp--]<a href=&#39;/e/search/result/?searchid=[!--id--]&#39;>[!--title--]([!--writer--])
</a>  [!--empirenews.listtemp--]
Copy after login

Explanation: The writer field here is originally It is the author, but it is not needed here. We use it to over-receive the click number OnClick field.

It is recommended to study "Empire cms tutorial"

2. Create a new custom JS, the query SQL statement is as follows, remember to select the template as the newly created template we just created:

The code is as follows:

select searchid as id,keyboard as title,onclick as writer from [!db.pre!]enewssearch where iskey=0 order by 
onclick desc limit 10
Copy after login

I hope this article will be helpful to everyone’s Imperial CMS website building.

The above is the detailed content of How Imperial CMS achieves the click effect of search keywords. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:www.word666.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template