Forums

How can i make a grouped List

webuniverse 13 Jun, 2018
Hello

I do not know how i can explane my need in english, so i make Pictures :-)

I need a List like this:


But i only can make one like this:



Course Categorie 1
- Kurs 1
- Kurs 2

Course Categorie - Kurs 2
- Kurs 3
- Kurs 4
- Kurs 5

and so on...

Thank you for help

Corinne
healyhatman 17 Jun, 2018
I don't think you can with the tools CC provides. You could always make it yourself though - use a PHP action and echo out the table yourself. CC uses Semantic-UI if you need help with the right HTML

https://semantic-ui.com/
healyhatman 17 Jun, 2018
Either that or use PHP to split the data into several arrays, put those into another array that you use as the data source of a Loop, and for each array in the loop you call the table view with your data
Lorentz 19 Jun, 2018
Hi Corinne,

May be I can little bit help.

To do what you need, you can use loop functions.

To use it, you first must get an array with your KATEGORIE using read_data in Functions tabs. If it's not in a specific table, try do sort it with the read_data function.

then Call a loop function.

So this is for the Event tab :[pre]{fn:Get_KATEGORIE_title}
{fn:Display_per_KATEGORIE}[/pre]
Then add a loop in Functions tabs :[pre]Name:Display_per_KATEGORIE
Data provider : {var:Get_KATEGORIE_title}
[/pre]
In the LOOP BODY, you will need to adapt the code in terms of your database table but this is what you need to do :
1 - Get the title KATEGORIE looking for in the current array and then set a variable containing it. [br]
2 - Use a read_data for this specific title :
Function name : GET_INFOS_FOR_ONE_KATEGORIE
Where conditions :
kategorie:{data:KATEGORIE_TITLE}
3 - Use a view table


The code will depends on how you make the array Get_KATEGORIE_title so this code below is just an example of what could be write in the loop body :[br]
{data.set:KATEGORIE_TITLE$(var:Display_per_KATEGORIE.row.TITLE)}
<div class="ui segment red">
<b> {var:Display_per_KATEGORIE.row.TITLE} </b>
{fn:GET_INFOS_FOR_ONE_KATEGORIE}
{view:DISPLAY_INFOS}
</div>
[br]
I don't explain each steps cause I think you know how to do. I hope it can help you .
webuniverse 19 Jun, 2018
Thank you very, very much for your help. I will try this soon.

CC is so a great tool, but all sometimes to difficult 😀
This topic is locked and no more replies can be posted.