On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hello guys,
    very interesting.. I’m a french graphic designer trying to develop my website, a mix between blog and portfolio.
    Portfolio is done, blog is not, because I don’t want do do that with the method "one ressource/one post" but impossible to find any decent tutorial about custom tables..

    French community is poor, so I try to post here, I had some good answers from here in the past.
    I’m not a developper but I try php a little bit if necessary.

    If someone could give me some links or thoughs about how to implement a blog with this technique (I have seen the tuto in the docs, but this is a one post/one ressource approach)

    I think if I can’t find a solution to do that with modx I will try Wordpress (sic)

    Any sort of help would be extremely appreciated.
    Thanks

    (sorry for this silly english)
    • Peter Falkenberg Brown Reply #132, 8 years ago
      Dear Jason and All,

      I’m glad to see how MODx Revo is progressing, and I’m glad to see more documentation and examples in the manual pages.
      I’ve browsed around, and saw a lot to digest.

      However, I wasn’t able to find one particular tutorial or bit of documentation that I’d like to find, and wondered if I’ve missed it,
      or if someone had a tutorial on the web somewhere.

      That is: in the discussion above, it has been suggested that the best way to approach large sites is
      to use one (or a few) resources to display thousands of data records.

      Does anyone have a tutorial on exactly how to do this?
      It might be easy, but my brain hasn’t grokked it yet.

      With Ditto, etc, I’m still in the mindset to pull each resource as individual content, and the method
      mentioned above seems to be pointed toward the concept of a resource acting as a template.

      It would also be important to be able to use friendly urls, with a data field for that purpose,
      as well as the ability to use the [~id~] linking system.

      One model that I need to accomplish is the magazine concept with levels, and different templates for those levels:

      - multi-sections, sections and article pages.

      I have different templates already, but I’m still unclear about how to use just one resource to pull the data from external
      data tables.

      And then of course there are the issues of managing those external tables, via the Manager.

      Other issues of concern include the ability to manage chunks, snippets, tv’s, etc, that can
      be used with the external data records.

      It would be really great if MODx could release sample "apps" in this regard.
      (Even really simple ones, that could be used as concept apps.)

      Thanks for anyone’s help.

      Peter
        Visit The Significato Journal ~ nectar for the soul ~ http://significatojournal.com
      • There’s a tutorial here that might help: http://bobsguides.com/custom-db-tables.html.

        You might want to use a custom snippet and a Tpl chunk rather than a resource to display a record. At some point, I’ll add to the tutorial to show how to display a record with a Tpl chunk, but it’s basically something like this:

        ShowQuote Tpl chunk:

        <p class="quotation">Topic: [[+topic]]<br />
        Quotation: [[+quote]]<br />
        Author: [[+author]]</p>
        


        <?php
        /* ShowQuotes snippet */
        
        $quotes = getCollection('Quotation', array('topic'=>'SomeTopic'));
        foreach($quotes as $quote) {
        
             $fields = $quote->toArray();
             $output .= $modx->getChunk('ShowQuote', $fields);
        }




          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • Is there no hack around this for 1.0.5 and what sets the limits at 5,000 resources?
            Steven James McLean
            Tech Lead
            springbokagency.com
          • See #3 http://forums.modx.com/index.php/topic,36714.0.html
            Old post. I know people have been play

            For Revo check this out http://modx.com/extras/package/uncosnews
              @hawproductions | http://mrhaw.com/

              Infograph: MODX Advanced Install in 7 steps:
              http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

              Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
              http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • Peter Falkenberg Brown Reply #136, 7 years, 3 months ago
              Hi All,

              Is this topic still open? Are we beating a dead horse to continue discussing it? I hope not, so here goes...

              I just bought Bob's book. Great job, Bob! And in less than 800 pages! smiley.

              I've read a lot of it, and skimmed a lot. I've installed the latest Revo, and am building an honest to goodness site with it. I really like the new syntax for tags.

              I'm still looking, however, for a really great tutorial on how to manage thousands of articles, with the same coolness that using Resources gives one.

              Bob; your book seemed to be solidly in the "Resources as documents" camp, although you do mention external tables.

              With all due respect to Jason, who has articulated very well the need to separate out the data of those thousands of articles from the resource tree, I'm wondering if anyone has made any progress in developing an add-on to do just that.

              I've just re-read a lot of the posts above, and it seems to me that what I (and perhaps others) are really looking for with this, is an interface that provides all the standard things that come with the resource model; the snippets, the TVs, you name it. And yes, I use TVs for storing data, because I have data field needs that aren't in the main list -- things as simple as "subtitle".

              But frankly, after logging in to the manager, in order to be functional, an editor will need to be able to view the various fields to post into, and use the various tools that are already included so excellently in the standard resource model.

              I admit; I haven't spent hundreds of hours trying to program this "non-resource" interface, and am just checking in again to see if anyone else has done so, or if there's other news on this front.

              Thanks,

              Peter
                Visit The Significato Journal ~ nectar for the soul ~ http://significatojournal.com
              • Thanks for the kind words, and for buying my book. smiley


                MODX now has Custom Resource Classes (http://rtfm.modx.com/display/revolution20/Custom+Resource+Classes), but they're generally *not* used to add extra fields. TVs are still the recommended method for that.

                The Articles extra is designed specifically to handle blogging and it moves the resources out of the resource tree and into a Custom Manager Page. I don't think it will meet your needs, but it sounds like you might want to develop something similar.


                ---------------------------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                MODX info for everyone: http://bobsguides.com/modx.html
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                • Peter Falkenberg Brown Reply #138, 7 years, 3 months ago
                  Dear Bob,

                  Thanks... yes, I saw the Articles extra, but it wasn't quite what I wanted.

                  Hmmm.... well, either someone else will submit an extra that fits my needs, or I'll program it myself, or, more likely, I'll use resources until I max things out.

                  But, so far, I really like MODX Revo. Jason and team, thanks for programming this!

                  Peter
                    Visit The Significato Journal ~ nectar for the soul ~ http://significatojournal.com
                  • Peter, this probably isn't an exact fit for your situation, but I just wanted to point out MIGXdb:

                    http://rtfm.modx.com/display/ADDON/MIGXdb

                    I don't know if it would perfectly match your needs, but it is a recent addition to the community that handles custom DB table management within the standard MODx tree-based structure.