- Issue created by @Steven Snedker
I wish to have four distinct sections on my front page - but only use one entityqueue (called Frontpage).
Section 1: Just in. Queue position 1-5 in Frontpage. 5 elements. All article nodes.
Section 2: News. Queue position>6 in Frontpage. Only article nodes tagged with news. 5 elements
Section 3: Reviews. Queue position>6 in Frontpage. Only article nodes tagged with review. 5 elements
Section 4: Commentary. Queue position>6 in Frontpage. Only article nodes tagged with commentary. 5 elements
I could solve this using 4 distinct queues and have a script copy items from the master queue to the slave queues.
But a position filter in views would solve the problem better.
We already get queue position as a field and a sort.
Add stuff to /entityqueue/entityqueue.views.inc
Something along the lines of
$data[$target_base_table]['entityqueue_relationship_position']['filter'] = [
'id' => 'entity_queue_position',
'type' => 'integer',
'group' => t('Entityqueue'),
'title' => t('@target_label Queue Position', [
'@target_label' => $entity_type->getLabel(),
]),
'label' => t('@target_label Queue Position', [
'@target_label' => $entity_type->getLabel(),
]),
'help' => t('Filter by position in the @target_label queue.', [
'@target_label' => $entity_type->getLabel(),
]),
'field' => 'delta',
'field table' => $subqueue_items_table_name,
'operator' => ['<', '>', ''>=', '<=', '=', '!=' ],
'field field' => $columns['target_id'],
];
Active
1.0
Code