mirror of
https://github.com/gantry/gantry5.git
synced 2026-08-19 01:15:04 -05:00
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:
committed by
Djamil Legato
parent
68888ff9a1
commit
bb67d39939
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user