-
Notifications
You must be signed in to change notification settings - Fork 7
Doc.Manage Topic
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:
- Add a topic
- Pull articles to topic
- Create custom template for topic homepage
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:
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.
RETURN to the default page of topic section, and go to the pull articles
tab, you can see the 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.
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.
WE have provided a default template for topic homepage, which is:
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.