I presume the way you are creating the data file is something like if (the drupal node has instructor) then output "instructor: ..." in the json file if (the drupal node has coursenumber) then output "courseNumber: ..." in the json file
So I am simply suggesting to add if (the drupal node has instructor OR the drupal node has courseNumber) then output "hasInstructorOrCourseNumber: true" in the json file Maria McDowell wrote: > David, > > Can you describe this in more detail? It sounds like you built a field > that combined the content of other fields, if they exist? Hmmm. Nice > hack, but due to other issues, I am not sure I can use this (we are > creating the json file on the fly utilizing drupal databases). But more > details and I might... > > Thanks, > Maria > > David Karger wrote: > >> Maria, I had a similar problem and fixed it with the following hack: I >> added a new boolean property, "hasInstructorOrCourseNumber" to the >> exhibit data file, then built my div on ex:if-exists >> .hasInstructorOrCourseNumber. The kind of "denormalization" is a Bad >> Thing according to database engineers but it does provide a quick fix >> to the problem. >> >> Maria McDowell wrote: >> >>> Johan, >>> thanks again. Hmmm, no, I definately meant 'OR'. And your solution >>> would create >>> duplicates, yes? So if .instructor and .coursenumber BOTH exist, I will >>> have both divs, right? I think that I do not want that, too much >>> code as >>> you said, and it will duplicate on the page. Hmmm. Need to think on >>> how to >>> solve this. >>> >>> Thanks, >>> Maria >>> >>> >>> _______________________________________________ >>> General mailing list >>> [email protected] >>> http://simile.mit.edu/mailman/listinfo/general >>> >>> > > _______________________________________________ General mailing list [email protected] http://simile.mit.edu/mailman/listinfo/general
