Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • phenryll 28 posts 53 karma points
    Feb 05, 2011 @ 18:46
    phenryll
    0

    Case study: need advices

    I have been pondering on a solution to the following problem:

    Let's suppose I have 3 movies:

    Movie1 - Author1 - Genre1
    Movie2 - Author1 - Genre2
    Movie3 - Author2 - Genre1

    I'd want to have a page:

    • a page that lists all the movies;
    • a page that lists all the authors;
    • a page that lists all the genres.

    Moreover, I'd want to have:

    • a detail page for each movie;
    • a detail page for each distinct author, which lists all the movies he made;
    • a detail page for each distinct genre, which lists all the movies of that genre.

    I can create a Movies document type and a SingleMovie document type along with 3 fields: MovieName, Author, Genre.

    Doing so listing all the Movies is straightforward. But what about the other requirements?

    Thanks for your help.

    R.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 05, 2011 @ 19:00
    Jan Skovgaard
    0

    Hi Phenryll

    I think I would also create a document type for Author and Genre.

    On the movie document type I would then create content pickers as the property on the author and genre fields.

    You can then have a branch of authors and genres, which you can reference using the content picker, which should give you some very flexible opportunities in order to present your content.

    Does this make sense?

    /Jan

  • phenryll 28 posts 53 karma points
    Feb 05, 2011 @ 20:19
    phenryll
    0

    Hi Jan,

    I think you are right :D

    I am thinking of the following recipe to solve the problem:

    3 outer document types are needed: Movies, Authors, Genres. Doing so, it is straightforward to list all the child items they contain.

    3 inner document types are needed: Movie, Author, Genre for the sake of encapsulation.

    The outer document types have a content picker OR a ultimate content picker (which provides more flexibility when traversing a hierarchy of document types).

    The content picker/ultimate picker refers to a inner document type, such as Movie, Genre, Author.

    How can I meet the last 2 requirements? Actually I think that Relation (or XPath) may come in handy.

    What do you think about it?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 05, 2011 @ 21:56
    Jan Skovgaard
    0

    Yes the ultimate picker has some nice benefits. If you are using uComponents there's an even better node picker datatype in that package.

    What do you think of by the relation? As I read your first post you should be able to extract the needed information by using the GetXmlNodeById extension so you can fetch the data from the selected nodes?

    /Jan

  • phenryll 28 posts 53 karma points
    Feb 06, 2011 @ 08:38
    phenryll
    0

    You are right.

    Thanks a lot for your help :p

Please Sign in or register to post replies

Write your reply to:

Draft