We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48340
    • 4 Posts
    Sorry for the newbie question, but I've been dabbling in MODX for a couple of weeks now, getting familiar with the system, reading the entire 148 page Wayfinder e-book, watching a few hours of tutorial videos and so on, and I'm about halfway through redoing a client's small corporate website entirely in MODX as a test case. Compared to a "real" programmer, I'm a Neanderthal when it comes to coding. Compared to a typical designer, I'm a genius. I was under the impression that MODX was really suited to someone like me - a perfectionist front-end designer who wants to finally stop building static sites yet hates the constraints and mind-numbing frustrations of WordPress. For the past 10 years, I've always preferred to just write some small CMS tools using ASP and MSSQL and do everything else on client sites in static format. I really want to use MODX and love MODX, but after 2 weeks and a few all-nighters (including a 15-hour stretch today), I'm feeling pretty disheartened.

    At first, MIGX seemed like a Godsend, a way to handle all that content that would just be too much for individual Resources: job postings, management team/board of director biographies, press releases, event calendars, client lists, testimonials and so on. I used Articles for the database of Press Releases, and was then able to use GetResources to spit out a short list of headlines/dates on the homepage, and a short list of headlines/dates on another landing page, and then, of course, the full list on the "Press Releases" page of the site. Awesome.

    I figured that MIGX would allow me to do the same thing with Management/Team bios - create a running list and then pull that information in wherever I wanted it. So I created a TV with MIGX called managementList, made a nice form and grid out of the data I wanted to capture - name, title, bio, and a checkbox list if they were on the Senior Management Team, the Board of Directors, and/or the Advisory Board (since a few key people, like the CEO, are both on the Senior Management Team AND the Board of Directors). I have three separate pages ("Resources") - one for each of these three lists, just like you'd see on a normal corporate website under the "About the Company" section. I thought I could simply create a single "Team" template (since all three pages would look the same, just output different individuals from the list in the database), assign that template to the three relevant pages (Senior Management Team, Board of Directors, and the Advisory Board), and then use some kind of "where" criteria in my GetImageList call to pull only the Senior Management Team into that page, the Board members into that page, and the Advisory Board folks into that page. Just like you would if you created a basic little Access table and created a recordset by querying the table.

    But it turns out that unlike with Articles, where the data I populated the DB with is accessible anywhere, it seems like the data I enter using my nice little MIGX popup is only available on THAT PAGE. I entered all of the team members using the Senior Management Team "Template Variables" tab, and then figured I could grab that info anywhere. But of course, I guess all those folks are now sort of tied to the Senior Management Team resource, right? So all I've accomplished is making a different form for users to enter team member data, but I haven't been able to accomplish what I thought was the whole point of database-driven sites - to get all the data organized in tables and then reuse that data in lots of different ways.

    I'm clearly missing something fundamental about MODX or MIGX or something. To accomplish what I'm trying to accomplish - create ONE place where my users can add/edit team members who may appear on multiple pages, or testimonials which will appear throughout the site in sidebars, or upcoming industry events that might be listed in multiple places based on certain custom values in the DB - do I have to use MIGXdb? Is that how you create something akin to Articles?

    Heaven help me, I'd rather gouge my eyes out than go back to trying to master WordPress, but with Custom Post Types and Custom Fields, I can do these kinds of things pretty easily. This is why I feel I must be missing something here, since I have a sort of faith that WordPress is an overhyped toy for hobbyists, and Drupal/Joomla are complex messes for real coders...and that MODX is something great. But so far it's seemed to be very limited without a LOT of coding and understanding of a lot of arcane and largely undocumented proprietary language that can only be pieced together by reading a gazillion forum posts and guesswork (or else be a PHP expert).

    This may be much more of a rant/cry for help and reassurance than an actual question, but I'm feeling pretty disheartened, stressed and crestfallen at 2:35AM after a 15-hour marathon beating my head against the keyboard, and with about 35 tabs open all trying to find hints and clues as to how to make seemingly simple things work.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can always specify the resource to pull data from in the properties of the MIGX output snippets.

      MIGx stores its data as a JSON string in the usual TV site_tmplvar_content table's 'content' field. The MIGx output snippets automatically parse the JSON string.

      You may actually want to be using MIGXdb, which allows you to store each item in either existing tables (such as site_content for resources or the user tables for users) or in custom tables.

      You can even create custom user classes based on the modUser class, and simplify your data input and output considerably. http://rtfm.modx.com/revolution/2.x/developing-in-modx/advanced-development/extending-moduser
        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
        • 48340
        • 4 Posts
        First of all, thank you so much for the quick response, it was incredibly helpful.

        Quote from: sottwell at Jul 17, 2014, 02:21 AM
        You can always specify the resource to pull data from in the properties of the MIGX output snippets.

        This in particular solves a lot of my concern, and once I read this, I looked around and discovered the "&docid=" parameter I could set in a getImageList call.

        Quote from: sottwell at Jul 17, 2014, 02:21 AM
        You may actually want to be using MIGXdb, which allows you to store each item in either existing tables (such as site_content for resources or the user tables for users) or in custom tables.

        Thanks for confirming this suspicion for me as well. This approach seems like a lot of work just to be able to offer users a place to enter site content that's not directly tied to a particular page, however. If you were creating a site that had some kind of content like "Testimonials" or "Quote of the Day", i.e., content that didn't have a page ("Resource") of its own to live on, but which was content captured by the CMS and then plopped into various templates throughout the site using getImageList, is creating MIGXdb "testimonials" item that sits under one of the dropdown menus how you would do it? So if a client user were to add a new Press Release, they'd go into the Press Releases page ("Resource") and use the Articles widget to add it. If they were to add a new Employee Bio, they'd go into the Team page ("Resource") and use my custom MIGX widget under the Template Variables tab. But if they wanted to add a new Testimonial, they'd go to a dropdown menu in the top nav where I created my custom "testimonials" selection using MIGXdb? Or would you instead create a Testimonials page ("Resource") which was hidden from navigation and create a MIGX widget there, so that the client didn't have to use two different methods to add site content?
          • 4172
          • 5,888 Posts
          you can organize it, how you feel it's the best for your client.

          On some of our projects editors have only access to one MIGXdb - CMP, where they can do all there stuff in some different tabs, for example a tab for articles, another one for Testimonials, another one for Quote of the day and one for Events

          On other projects we have (hidden) Resources in the resource-tree with some MIGX and MIGXdb-TVs where they can add their stuff either to a MIGX-TV, to custom-tables or to subresources.

          MIGX(db) is very flexible, where you can do your stuff with, partially, even at frontend is possible.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 48340
            • 4 Posts
            Quote from: Bruno17 at Jul 17, 2014, 01:42 PM
            On some of our projects editors have only access to one MIGXdb - CMP, where they can do all there stuff in some different tabs, for example a tab for articles, another one for Testimonials, another one for Quote of the day and one for Events

            Thanks for your response. This is a nice, clean approach you suggested - to essentially bundle all of the client's editing areas under one section, your CMP, and use tabs within that. But I assume if you also had Articles, that would have to be in a separate place anyway (as would any normal page copy edits), unless you rolled your own Articles clone within your MIGXdb TV.