Related List View inside Single Template dynamically


I just came back from this thread here.

What I am trying to do is range related list in single page without being able to know the type.

{{ range .Data.Pages }}

does not work in the single page and I cannot do :

{{ range first 4 (where .Site.Recent “Type” “product”)}}

Because I don’t know the type that has been clicked by the user.

I am trying to make a sidebar that is available in list view as well in single view. I don’t and can’t created a different template for each sections of my websites. I want it to use the default list template.

Anyway I can range the related list without knowing the parent context?