贊助方

Blog

Add Latest Articles Plugin

Translated from: Django cms 教程九: 添加最近發布文章列表

原载:蜗牛博客
网址:http://www.snailtoday.com
尊重版权,转载时务必以链接形式注明作者和原始出处及本声明。

1. Establish a page titled "About"


First, get into the page, and click on the edit button on the navbar to switch to the edit mode.

Then, click on Page and execute on the Page Settings.

result image

Set the page title as "About" in the pop up window, and confirm that the slug would be "about". If all done, click on the "Save" button. 

And click on "Publish page changes" in the toolbar.

2. Add home page

After the above steps, we click on "edit page" on the toolbar so that we grt into the edit mode again. Then, click on "Page", "Create Page", and "Duplicate this Page". 

In the pop up window, type "Home" as the title and the clug, then click on "Save" button.

Click on "Publish this Page". 

Set the order of the pages

The home page is ought to come first, so we need to adjust the order.
Click on the link beside django CMS, and choose the Page function in the menu.

According the the above page, we can see that the priority order is: About > Blog > Home.
But we have to make the order : Home > About > Blog. We could set the sorder by dragging the items.

The order is consistant with the priority to show page in real case.

Add the latest articles list


1. Clear all the plugins.
In the edit , switch to the structure mode.

In the pop up window, click on the icon which is on the far right of the row "content", and choose "Empty all" in the pop up menu.

Then choose "Yes, I confirm" to ensure the execution. 

2. Add Latest Articles
Click on the "+" icon at the right side of block "Content", and choose "Latest Articles" in the pop up window.

Set the limit of articles amount on one page to 4, and save the changes.

Click on the button "Publish page changes" again.

3. See the changes
We navigate into home page, and we can see the latest articles now.


Previous: Customize your own blog template

Click here to download a PDF copy of this article

Save it to read later, or share with a colleague


Comment

There is no comment, you can make the first one!

Comment