Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Styling tracker field item-link multiple output

posts: 8643 France

Hello,

I have a tracker with an item link field that display multiple items and multiple fields for each item. Results are displayed using a plugin List and table template for output.
IE:

  • firstname1 lastname1 (group1)
  • firstname2, lastname2 (group1)
  • firstname3, lastname3 (group2)

etc.

Using "Format for Customising Multiple Fields" it is ok and work just fine.
However this is taking a lot of space, not easy to read and not really 2022. 😉

I would like to style the results with color per group, something like this.

  • firstname1 lastname1
  • firstname2, lastname2
  • firstname3, lastname3

I have already a css class for each group value.

For the value of "Format for Customising Multiple Fields" I tried the wiki syntax div way:
{CODE()}
{DIV(type="span" class="%2")}%0 %1 (DIV)
{CODE}
It displays the syntax:
Image
As it is not possible to upload picture in the forum using the toolbar (security check), if the above is not working see the image at : https://ibb.co/Yb7XBny

I tried the HTML way

Copy to clipboard
<span class="%2">%0 %1</span>

The code is trimmed and the html removed (which make sense)

Alternatively I could use a smarty template instead of the table template, explode the item-link array, capture the group and use it as a class... quite complex and fragile for a "simple" thing. 🤯

I'm looking for a trick to style the output and may be someone has some lead.

There are no comments at this time.