Skip to content
linzongshu edited this page Sep 2, 2013 · 1 revision

Introduction

ARTICLE module provides topic section for users, in this documentation, I will introduce you how to operate topic section. This documentation mainly contains the following content:

  1. Add a topic
  2. Pull articles to topic
  3. Create custom template for topic homepage

Add a Topic

LOG in topic section from navigation or request the url /article/topic/list-article/, then you are in the default page of topic section, just go to the list topic tab and click add, you can see the page like this:

add topic

YOU can add topic content and feature image, it will display in topic homepage, it also allows you to choose custom template, I will introduce it later.

JUST click submit button to create a topic, then it will redirect to topic list page, you can active/deactivate, edit or delete topic if you want.

Pull Articles To Topic

RETURN to the default page of topic section, and go to the pull articles tab, you can see the page:

pull management page

ALL published articles will be list at the table, you can search articles you need through the search bar, it allows you to search by category or article title.

NOW you can pull just one article or multi articles by check the checkbox before the article.

pull article

CLICK the pull button, a window will pop up, choose a topic and click pull button, these articles will pull into the topic you choose. You can go to the default page (List Topic Articles tab) to review the operation result.

CERTAINLY, in the default page, you can also remove the pull articles.

Create Custom Template For Topic Homepage

WE have provided a default template for topic homepage, which is:

topic homepage

IN this page, I dress up a block to make the homepage more abundant. We have assign some parameter to homepage, which are:

  • $title: the title of topic
  • $image: feature image of topic
  • $content: topic introduction
  • $articles: all articles of a topic

These parameters can use in template directly. Now we begin to add a template for homepage.

THE format of custom template is topic-custom-{template name}.phtml, therefore, you should add a file with name like this in the article/template/front directory.

NOW it is time for you to add your HTML tags in this template, remember to change the template in the topic edit page to enable your template.