I have been struggling with this idea for close to a year now, and sadly I don't have a very good solution. I tried using a modified Matrix datatype, but that is problematic as I cannot change the name of a spec site-wide, nor can I easily change the order of the specs. After various other tests, I have fallen back on standard Text Lines, which isn't a good solution either, as each product can include 15 specs, thus increasing initial content creation, storage space and display time.
I would love to see a solution to the issue.
Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
I think that I would have made a new datatype for this where you define the fields to compare at class level and just fill in the values when you edit the object. When you have this as a separate datatype you could design it so it will be simple to compare different products with different values.
I would not serialize this into xml when storing since it will then be hard to do comparison.
I think a new datatype which is designed for this is the best way. I don't see any existing datatypes really fit into this.
Eirik, I do indeed store them as a class attribute which is a Text Line.
Bård, that is a good point. When I set up my first site, which was the one with the large amounts of product specifications I wasn't familiar with the system, so that never ocurred to me. I like your idea and may very well use it with the next site I create.
Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
You must be logged in to post messages in this topic!