How do I phpcms V9 's first page data list? I saw a lot of related posts on the Phpcms forum, but none of them solved the problem. Ask this question person, is want to phpcms v9 make blog appearance, but is there a lot of excellent blog program, PHP, such as wordpress,asp have Zblog, may be a fancy phpcms v9 powerful function bar. Seriously, I have this idea, too. So I try to use Phpcms v9 to make a blog, and then to the first page of the list of data, found that only the first page of the list of data can be displayed, when the second page is clicked on the page number or stay on the first page, and the data record is the first page. It may be hard to understand, so take a look at my debug record.
The following is the code for the first page template data list
The code is as follows |
Copy Code |
{pc:content action= "lists" catid= "6" num= "2" order= "id DESC" page= "$page"} {Loop $data $r} <div class= "Content" > <p> {$r [description]}</p> Modified <div class= "Bk20 hr" > </div> {/loop} <div id= "pages" class= "text-c" >{$pages}</div> One {/PC} |
Update the home page cache, and then look at the effect of the first page data list 3 pages, when clicked 2nd, 3 of the page number, the Address bar display URL is
1 |
http://localhost/phpcms/?page=2 |
2 |
http://localhost/phpcms/?page=3 |
There's nothing wrong with that, but the page number stays on the first page, and the list displays the data from the first pages, as shown in the figure:
That's the problem.
In the debugging process, I noticed the most is that when you click on the page number, the address bar to display the corresponding page number, if you can pass the page number value to "page", What will change? So I put the code
"Page=" $page "" changed to "page=" $_get[' page ' ", Update the home page cache again, click on the second page, again look at the effect of the picture:
Phpcms v9 Home Page List paging success! ∩?∩ This means that Phpcms v9 can also be used as a powerful blogging program.