netgen-layouts / layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.
https://netgen.io/layouts
MIT License
36 stars 6 forks source link

[Feature] Be able to create a dynamic list with multiple collections #18

Open wizhippo opened 6 years ago

wizhippo commented 6 years ago

Currently you can use a dynamic list and use the current content location as the parent and add individual items manually. The ability to add additional parents manually would be useful.

For example you have folder which contains banners to show on home landing pages along with showing the banners in the current location without having to specify the global banners one by one.

emodric commented 6 years ago

The built in query type was made simple(r) (similar to eZ legacy fetch) on purpose. We didn't want to cram in many features in it to simplify BC and upgrading.

You can however create your own query type (it's in the docs on https://docs.netgen.io) by using query type traits available in this repo to cut down on code duplication. Ping me for pointers if you need them :)

wizhippo commented 5 years ago

So I should be able to use ParentLocationTrait and LocationType as a reference and make versions that allows multiple parent locations? Is this the right direction?

emodric commented 5 years ago

Yep, that's about it!

wizhippo commented 5 years ago

Playing with this a bit and I think I have the issue a little clearer and more generic. Right now we can add multiple manual items but only a single collection. How bad of an idea is it to allow multiple collections like manual items or a collection that wraps a number of collections?

ilukac commented 5 years ago

We didn't want to complicate this too much. The aim is to focus on how to solve 80% of use case, then for the rest its fairly straightforward to implement custom queries, even more so if you use Site API ;)

emodric commented 5 years ago

Concept of a collection that wraps other collections is something we already toyed with, to be honest, but later "postponed" as it would significantly increase complexity of the user interface.

wizhippo commented 5 years ago

I understand, for now I will continue in the direction of a custom collection. Not sure if you want to close this issue or leave it open for a future feature.

emodric commented 5 years ago

:+1:

It can stay open, no harm in that :)