Loading...
 
Skip to main content

It should be possible to include the ALTERNATE value of a plugin List within the results template

Status
Closed
Subject
It should be possible to include the ALTERNATE value of a plugin List within the results template
Version
27.x
Category
  • Feature request
Feature
Wiki Plugin (extends basic syntax)
Resolution status
Fixed or Solved
Submitted by
Bernard Sfez / Tiki Specialist
Volunteered to solve
Alvin Bauma
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

With the plugin List you can use a template.
If there are no results you can set the alternate value that will be displayed.
But this value won't be display using the template design but as an element on its own.

Use case:
I want to create a dashboard with several gauge where 0 items is a valid value that lead to specific design with conditions.

Just to give an idea:
0 item = green background
1 item = warning background
>5 items = red background

The Alternate value should be used in the template as a value and not as a string on its own.

Solution
Workaround

With the actual if there is no items (0) it is possible to include the design AND the logic into the ALTERNATE parameter... But this is a real pain (not all is possible) and create a lot of duplication.

To use "0" as a value there is a workaround.
{CODE()}<span>0</span>

The rest while complicate can finally be done using Smarty conditions and templates

Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8687
Created
Sunday 08 September, 2024 08:06:26 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Wednesday 07 May, 2025 13:51:14 UTC


Show PHP error messages