Open /includes/display/ and find: RecentArticlesPanel.php and make a copy and name it something, for this example I'll call it OtherArticlesListPanel.php
Then do the same for the .html file located in /templates/{your-template}/Panels/RecentArticlesPanel.html
Open the .php file for editing and find:
AL_RECENTARTICLES_PANEL
It will be in there twice, once in quotes, the other not. Change them to something new for this file, e.g.:
AL_OTHERARTICLESLIST_PANEL
Now you need to copy the snippet file which controls how each article is displayed in the list. The snippet is located at:
/templates/{your-template}/Panels/Snippets/ArticleList_Recent.html
Copy that file to another, e.g.
/templates/{your-template}/Panels/Snippets/ArticleList_Other.html
Now find:
$articles->_set('ArticleListSnippet', 'ArticleList_Recent');and change the 'ArticleList_Recent' to the name of the file you just made, e.g.:
$articles->_set('ArticleListSnippet', 'ArticleList_Other');Also, find this line:
$GLOBALS['SNIPPETS']["ArticleList_Recent"] = $this->GetRecentArticleList();
and change it accordingly as well, e.g.:
$GLOBALS['SNIPPETS']["ArticleList_Other"] = $this->GetRecentArticleList();
Inside your snippet file, you can use these placeholders:
%%GLOBAL_text%%
%%GLOBAL_authorurl%%
%%GLOBAL_author%%
%%GLOBAL_publishDate%%
%%GLOBAL_categories%
%%GLOBAL_authorpic%%
%%GLOBAL_content%%
%%GLOBAL_url%%
So if you put in:
<a href="%%GLOBAL_url%%">%%GLOBAL_text%%</a><br/>
It will use that for each article that is to be shown from the database. The result will be a list of the articles with their title linked to a page with the full article.
You can change the number of articles to show by editing the first file again and finding:
$this->numArticles = $GLOBALS["AL_CFG"]["NumRecentArticles"];
and changing it to something like this:
$this->numArticles = 5;
Then you can include it into your template files using:
%%Panel.OtherArticlesListPanel%%
