Adds the ability to select single articles by entering their IDs. (#1591)

* Added the ability to select single articles by entering their IDs.

* Make sure empty spaces are stripped out.
This commit is contained in:
Ivo Valkov
2016-09-25 23:04:17 -07:00
committed by Djamil Legato
parent 68888ff9a1
commit bb67d39939
2 changed files with 12 additions and 1 deletions
@@ -21,7 +21,12 @@
{% set categories = joomla.finder('category', category_options).published(1).language().limit(0).find() %}
{# Content Finder #}
{% set article_finder = joomla.finder('content').category(categories).published(1).language() %}
{% if filter.articles %}
{% set article_options = filter.articles ? {id: [filter.articles|replace(' ', '')|split(',')]} : {} %}
{% set article_finder = joomla.finder('content', article_options).published(1).language() %}
{% else %}
{% set article_finder = joomla.finder('content').category(categories).published(1).language() %}
{% endif %}
{% set featured = filter.featured|default('include') %}
{% if featured == 'exclude' %}
@@ -23,6 +23,12 @@ form:
description: Select the categories the articles should be taken from.
overridable: false
article.filter.articles:
type: input.text
label: Articles
description: Enter the Joomla articles that should be shown. It should be a list of article IDs separated with a comma (i.e. 1,2,3,4,5).
overridable: false
article.filter.featured:
type: select.select
label: Featured Articles