How to Show related posts (list) by current post category?

How to Show related posts by current post category?

Like on the apps page I want to show only the list assign with the apps category

Here’s how the Backend looks (all the tables connected to the same category table)

@Harri_Sarsa ?

you can have an app or page variable with the value 1 or 2 or 3 and hide or shoe each option based on the value 1 or 2 or 3
To choose each option, set the variable
This is for the visibility IS_EQUAL(appVars.searchtopic, 1)

Hope it helps

Hey thanks for the response

@Mevi Can you help me with that

Hi!

You will need a somewhat complex formula to do this. Something like SELECT<post>(data.variable_with_all_posts_ever, SOME<category>(post.categories, IS_IN_ARRAY_BY_KEY(current.categories, "name", category.name))) (adapted to fit your specific schema and use case).

However, since you’ll be going through all posts (in the data variable), this can be quite a heavy/slow operation. I would recommend instead of doing it this way, having a backend to which you can query that they would send you e.g. latest 5 posts that match this category. Not sure if your backend is able to do that, but that would be the most elegant and efficient way of doing this.