With the knowledge base populated with articles of different categories, it's time to build a homepage to allow users to easily find what they need, and to quickly make new articles too.
Learn how to make a handy homepage like this one:
In the next two-column sections, we will create Panel blocks to show the most recently modified articles from each category.
maxResultsparameter to the preffered number of articles to show per column.
content:modification date. This will tell Reporting to sort the data based on the most recent modification date.
content:title. This will tell Reporting to display the title of each article.
For each column, a 'create new article' link can be added for user's convenience in creating a new article of the same template. The add-page macro from Linking is used.
The following diagram explains the structure of the Reporting block we just created. Most Reporting blocks will follow a similar structure as this one. First, there will be the outermost wrapper that determines how the Reporting block should be displayed. A list, table or plain textarea can be chosen to display the data. In this block, we choose to display the links of all articles as a list. Therefore, the report-list block is used.
Next, there will be a header that defines where the data is fetched. Within the header, we can also add conditions to the data such as filters or sorters.The header could be a content-reporter or local-reporter block. Since the data we are trying to fetch comes from multiple pages in the same space, we choose to use content-reporter as local-reporter is used to display data from the page itself. Next up, the conditions are nested within the filter block. In this block, we insert a date-sort block to get the most recent modification date.
Finally, the data is displayed in the body of our report, report-body. Multiple report-info blocks can be added in report-body, which takes a key to display some sort of data. In this example, it is the title of each article.