I have an interesting Spectra problem with relationships and datastructures.

The description of the problem is fairly easy:

1) I have a number of articles and a number of books for sale
2) When I display an article, it has a list of relevant books to show for sale in a 
separate sidebar
3) Each book can have multiple teasers including a default one. If there is a teaser 
for the article being shown on the page, then
that teaser should be shown since it will be more relevant to the article.

The objects I envision are an article object and a book object.

The article object would have an array property of relevantbooks.

Now for the harder part. I want to keep the teaser variants as part of the book object 
rather than as separate objects. What I know
will work but I don't know if it is "kosher" is to declare the teaser property to be 
multilingual and use the article objectID as
the language key for the structure (rather than EN, FR, DE, etc.). I have checked the 
code and actually tried it and it works fine.
Spectra does not care what key is used for the ISOLanguage although you will always 
get an EN one (which of course could be the
default teaser).

I know this approach precludes the site going multilingual but I don't think that is 
an issue for them. The other concern is whether
this contravenes any plans Allaire may have in this area. Gee, maybe we need a new 
Spectra property type called Multi-valued which
corresponds to a property that can hold a structure. I guess if you wanted to get 
fancy it could even handle multilingual stuff.

Basically what I want is a property that can be a structure. Unless I am missing 
something, this will only work with multilingual as
of Spectra 1.5.

I guess I could use WDDX to pack up all the teaser variants in a structure and store 
it in a simple property but that seems like a
waste of time to pack and unpack it all the time.

Thoughts?

Rich
[EMAIL PROTECTED]



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to