After some initial work with the taxonomy project I wanted to find out more about what was possible with nodes - and especially dimensions.
About the project
So, I ended up trying to implement a shop. Dimensions is right up that alley for products where sizes, colors and translations (the already known language dimension) will come at some point.
I started with the following structure
/shops/[shop-identifier]/products/[product-identifier]
All of these steps having there own nodeType for easier filtering later on and the Product got a nodeType that had a “abstract” product nodeType as superType.
Picture for you
The thing about dimension
What I have learned so far, is that:
Once you introduce Dimensions, all your nodes need at least one - or they can’t be found
In this case, I started implementing language but all of a sudden i wasn’t able to query /shops root - because it didn’t have at least one dimension.
In this case language doesn’t make sense for a shop to have that as a required dimension
We can always argue about that - but instead of language imagine that it was size i started implementing… That wouldn’t make sense at all for a shop - right
For me, the language dimension was only meant to be for a Product but that doesn’t seem to be possible, because then that product would be “left alone” with no connection to the root?
Can’t you set a default?
As this can end up holding several shops, there is no “default”. A french guy can create a shop, a german, a dane and so on, all of them having different “default” - so who/why am I to judge what should be default. And then again:
The default value of what dimension? Sizes? Color? For a shop?
The bug/big question
How should I go around this, where a dimension is only relevant for 1 nodeType and not for the whole tree of nodes?
To give a hands on example, let’s stick to this:
A T-shirt is created as a product. This t-shirt got different colors (dimension “color”) and sizes (dimension “size” - S, M, L, XL etc.).
How is this possible to implement, without generating dimensions for nodes, that doesn’t work with such thing.