Using aggregate in blocks

Using aggregate in blocks

  

Hi all,


I want my entries in the database to be displayed in the following manner.


June 2018

>Entry

>Entry


July 2018

>Entry

>Entry


The entries have an attribute which specifies their date, allowing them to be sorted accordingly into the respective "groups" in a sense.

What I have tried so far is to make an outer list where the source is a grouped aggregate according to month, and there is an expression within the list which displays this date. Besides the expression, there is a block, where I passed a date time input parameter obtained from the grouped aggregate mentioned earlier. Within the block, there is an aggregate containing all the entries, filtered based on the date time input parameter to show the entries for that month only.

My data does display, but it seems like they are all rendered on top of each other, such that the words from each post is layered on top of each other. Is there any way to resolve this

Hi Li Han,

Your approach seems the most straightforward one. However, your actual problem is displaying, and unfortunately you gave very little information on how you that. For one, I assume you are making a Mobile App? You mention a "list", what Widget are you using?

Mostly problems like this are caused by not using the right Widgets (e.g. not using the List Item inside the List etc.) or using the wrong CSS, or the wrong Theme. Can you supply a bit more information on what you're using?

Kilian Hekhuis wrote:

Hi Li Han,

Your approach seems the most straightforward one. However, your actual problem is displaying, and unfortunately you gave very little information on how you that. For one, I assume you are making a Mobile App? You mention a "list", what Widget are you using?

Mostly problems like this are caused by not using the right Widgets (e.g. not using the List Item inside the List etc.) or using the wrong CSS, or the wrong Theme. Can you supply a bit more information on what you're using?

Hi Killian,

Thank you for your reply. I tried investigating the issue further and found that while the inner list does display every entry, when you scroll down the "page", the render over issue kicks in, and some entries are cut off. I have attached an oml replicating the issue in my app for your review. Thank you!


Hi Li Han,

Like I said above, you need to put the contents of items in a List in a ListItem Widget for displaying to work correctly:


Kilian Hekhuis wrote:

Hi Li Han,

Like I said above, you need to put the contents of items in a List in a ListItem Widget for displaying to work correctly:



Hi Killian,

I tried putting a ListItem widget as mentioned above, but unfortunately the rendering issue on scroll still occurs (with the added problem of the entries being squashed to the left). Have you recalled someone who has tried to do something similar to this?

Mmm, too bad. And another approach, like in the EventList SilkUI example, using SectionGroups?

How would such content be displayed? Do I have to filter the results of the aggregate using my own internal logic?

Hi Li Han,

I would assume the EventList example is available in the SilkUI Mobile Samples component, so you can take a look how it's done.