We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7123
    • 2 Posts
    Hi, first of all I would like to thank people from MODX that manage to develop such great CMS.

    I need idea for some problem that been bothering me for some time now.
    How to create a template for Television guide ( tv program )? Idea is to have search for tv shows in witch you may choose tv station, type of tv show, date and time. My solution was to create separate template for one show ( with all relevant temp. vars. ), and that would be put in day-of-week-parent. So structure of tv guide would be:

    tv-station-n
    Monday
    tv-show
    tv-show
    ...
    Tuesday
    tv-show
    tv-show
    ...
    ...
    Most certain that this isn’t good solution. But apart of that there will be more than 20 tv stations, and all of them have more than 20 tv shows per day. It will be very difficult to put all the data for all tv station, and it will take lots of time. sad

    My main question is: Is it possible to somehow fill all of that data from txt/xml file by calling php script, or to automate this procedure in some other way.

    I must say that I’m a newbie in Evolution, and that there is probably a lot of things that I’m not aware of. ( and sorry for my bad English )
    Thank you, and please help smiley


      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Yes, a snippet could be used to work with an xml file. That’s usually how rss and other feeds are displayed, as well as some flash programs. PHP has lots of functions for dealing with XML files. A bit of javascript/AJAX with a php processor to parse the xml file as requested and you’d have a nice TV guide.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 7123
        • 2 Posts
        Thank you Sottwell. I’m already using lots of snippets to process data from rss ( with jquery/ajax support ), and all of that works just fine. But it seems that I don’t have idea to somehow ease all this work.
        Another idea that came to my mind is to create group of template variables that represent one TV show. We’ll have just one template for one TV station ( in one day ). That group of template variables would be put into this template. When ever editor want to add another show, he/she would just add another group of template variables. ( I’m thinking something like adding new picture to gallery, or new attachment to mail, by pressing + ). Is this possible?

        I just realized that this is bad idea, but is it possible. smiley

        Thank you.

        Aleksandar.