Provide zblog template_zblog them_wordpress template download and customization

The method of calling different templates is implemented by the paging bar of the zblog home page

Tianxing Studio 2014-05-28 16:31 course eight thousand nine hundred and seventy-three 2 Comments


The content of the article I wrote today is rather obscure. If you happen to encounter this problem, it is absolutely useful, but generally it is not.

I received a customer's order and used zblog as a station, which is in the style of cms Zblog template I was stuck in this problem when I was almost finished.

The layout of the front page of the template of the cms class is different from that of the list page, which is nothing at all, but the customer has to add a page bar under the column of the front page, as shown in the figure:

OK, here comes the problem. Click 2 to display the template of the first page. Because the first page uses the cms layout, the page bar is equivalent to invalid. How can I make the page bar display the template of the list page when I click 2, 3, or 4?

Baidu has been searching for this problem for a long time on the official zblog forum, but it has not been successful.

I had no choice but to go to the QQ group of zblog developers for help. I got a solution and put it up, hoping to help friends in need.

The complete code is as follows:

 {eval i=<#articlelist/page/now#>} {if i=1} Homepage cms template {else} <#template:article-multi#> {/if}

I have analyzed the meaning of this code according to my own meaning. First, give a condition that when you click paging (the code tag used is<# articlelist/page/now #>), you should treat it differently. The first page calls the cms template of the first page (copy the cms block code of the first page completely and replace the "first page cms template" in the code). Clicking the classification page calls the summary article template "<# template: article multi #>", This completes the practice of calling two templates separately from the homepage page bar in the zblog template of the cms class.

If there is any doubt, I also hope to make comments in the comment area at the bottom of the article.


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

yes two Comments from netizens:

  •  Netizens of Tianxing Studio

    Netizens of Tianxing Studio Six years ago (April 4, 2019) reply

    Still don't understand

  •  Qunxian

    Qunxian 8 years ago (2017-11-08) reply

    Where is this code written?

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation