I have a problem with News Show Pro GK5. I wanted to select 5 closest events (from today until future) from K2 category based on data created.
In the folder modules/mod_news_pro_gk5/data_sources/com_k2 I added a file configuration.json:
- Code: Select all
"supported_options": {
"sort_values": {
"new sort": "newoption",
},
And In the file model.php from the same folder for the funtion getArticles() I added:
- Code: Select all
if($config['news_sort_value'] == ‘newoption’) {
$sql_where .= ' AND (content.created >= NOW())';
}
And now here comes the question. Modification only applies to one module and when I want to add another module displaying another K2 category, I see a screen saying there are no articles to display. Where is my mistake? What did I forget about?