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 six hundred and two 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 Make a station, cms style Zblog template I was stuck in this problem when I was almost finished.

Cms class Template The layout of the home page 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 home page, as shown in the figure:

 The paging bar on the home page of zblog implements the method of calling different templates zblog different templates zblog pagination tutorial page 1

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 pagination (the judgment code tag is<# articlelist/page/now #>), you should treat it differently. The call to the home page is the home page call Cms template (Completely copy the cms block code on the homepage and replace the "homepage cms template" in the code). Click the category page to call the summary article template "<# template: article multi #>", thus completing the cms class Zblog template The method of calling two templates respectively for the home page pagination bar in.

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

Related recommendations

yes two Comments from netizens:

  •  Netizens of Tianxing Studio

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

    Still don't understand

  •  Qunxian

    Qunxian Seven 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
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login