We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38696
    • 6 Posts
    Good day, community.
    I'm new to MODx, and trying to design structure and logics of the new project: movie/cinema billboard.
    Currently i'm thinking of creating two resource groups: cinemas and movies (each with custom templates and TVs).
    Then a have to somehow connect movies and cinemas where they held in - it can be simply done with the help of TVs, but here comes trouble: one movie can go in a few cinemas at different times.

    So, I don't know how to implement this timetable and show one timetable on the moview page (in what cinemas it goes and when) and another one on cinema page (what movies are currently go and when).

    Thanks in advance for your attention and sorry for my eng =)
      • 33968
      • 863 Posts
      I guess you could do something like this with TVs but it would be much better in custom data tables. How's your php? If you know how to code, MODx has been really well designed to handle these kind of relationships smiley
        • 38696
        • 6 Posts
        I'm not pro, but feeling confident in php smiley
        Lucas, can you give me some links to read about using custom db tables in MODx.
        Found this tutorial in official doc: http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components
        but looks like it's not enough.

        Or simply create table by hands and create a custom Manager Page to manage this table? But then, as I understand, I'll have to use pure php to sort and display data on frontend - it doesn't looks good sad
          • 33968
          • 863 Posts
          That link is a good start as I imagine it will help you to define a many-to-many relationship between movies and cinemas (sounds like a fun site to work on). You might want additional tables to hold actors, directors etc as well.

          You could also look at:

          http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution
          Part 1 will help set up your schema and classes, and part 2 introduce you to building a CMP. As nearly everything I do now involves custom coding and CMPs, I use this as a reference for every new project.

          http://rtfm.modx.com/display/xPDO20/Defining+Relationships

          It will seem like pretty heavy going at first and there's a pretty steep learning curve in using ExtJS for CMPs... but it will really help you out once you get familiar. You can always ask back here if you get stuck anyway... cheers