Today, when using phpcms for a project, you need to call the full-site article on the homepage. However, phpcms does not have any labels available for use. After reading the default homepage template, there is such a piece of code:
{PC: Content action = "hits" catid = "6" num = "10" Order = "views DESC "}
{Loop $ data $ R}
<Li> <a href = "{$ R [url]}" target = "_ blank" >{$ R [title]} </a> </LI>
{/Loop}
{/PC}
I tried to write all the column IDs and found that there was no way to do it. I could only use the get tag.
The final code is as follows:
{PC: Get SQL = "select URL, title, inputtime, dayviews from v9_news, v9_hits where Concat ('C-1-', v9_news.id) = v9_hits.hitsid order by weekviews DESC "num =" 10 "siteid =" $ siteid "}
{Loop $ data $ R}
<Li> <SPAN class = "Num {$ n}" >{$ n} </span> <a href = "{$ R [url]}" Title = "{ $ R [title]} "{title_style ($ R [style])} target = "_ blank" >{$ R [title]} </a> </LI>
{/Loop}
{/PC}
Among them, 1 in C-1-is the model ID, which can also be used to customize the model. We recommend that you use it.
You can also read this article to call the get call method of "day, week, And month" on the homepage.
Get tag implementation homepage call all site popular articles