We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38441
    • 140 Posts
    I don't know if it's my lack of modx understanding or whether theres another error but on both the article and blog template, i have some 'side menu' content displaying info such as latest posts, tags, latest comments and articles etc. which show fine. But if i place that same html into other site-wide templates which are outside of the Articles template folder, they don't pull the information in.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That's because those placeholders are processed internally by the Articles system itself. If you use them outside of the Articles system there's nothing there to process them. Outside of the Articles system you would have to set up the various snippets (get Resources, Quip, etc) in your template yourself.
        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
        • 38441
        • 140 Posts
        Cheers Susan
          • 39932
          • 483 Posts
          @Jaykaye:

          Re: The Moderator for Quip. It uses the Username of the User Accounts, not the email address. It gets the email from the User's Profile. So, your Quip call would be:

          [[!Quip? ... ... ... &moderate=`1` &moderators=`jaykaye`]]  //<-- replace jaykaye with your username
          


          Notice the "s" at the end of moderators (plural). The is the most common mistake.

          ... about the scale and time involved in working with modx ...

          Actually, I think you misunderstood. MODx is the fastest development I've ever had in my life. Articles, in particular, was the biggest problem child I've had in any platform ever (and I've worked on many). For MODx, In 3 short months, I've developed 3 very complex websites (all with manual code), created the equivalent of two very advanced add-ons (and am working on a 3rd) and have taught quite a few how to use advanced concepts. MODx is fast. The key comes to understanding that you are using a programming platform, not just a content provider. You can literally make anything you want with MODx much easier than even most programming languages.

          To give you an idea, I've written a full front-end IDE for MODx, and using MODx can emulate any other CMS environment including WordPress (simple), Drupal (a little more complex), and MediaWiki with full support (I did this two weeks ago. It took me approximately 3 days). To assess correctly, I a not a fast developer. I am actually a slower programmer than many of my peers. MODx is fast itself if you have the right thinking.


          Okay, Back on Track: (Thanks for the downtime)

          Tags.... Here is where things get Hairy. You can't just take the Chunk like before. You have to make 1) Chunks and 2) repoint ArticlesContainer to it. But that only works for new Articles. For the ones you have already posted, you must 3) go into the database site_content table, find the IDs for the already posted Articles, and adjust one field (republishing does not fix them)...

          My Tags are actually Resource IDs so, I would have to write the snippet for plain text. So, here's what you should do first while I write the Chunks::


          • Create a Chunk, I would name it something like BlogTag. You remember the name so that when I post the Chunk, you can place it in there. In the meantime, just leave it empty until I repost.
          • In your ArticlesContainer, go to Advanced Settings, Click Tagging, Change "Tag Listing Chunk:" to BlogTag. Then click Save.

          This next step is convoluted. You must have access to the MySQL data directly.

          1. Open your database (I use phpMyAdmin)

          2. Go to the modx_site_content table.

          3. Run the following query to get the correct rows: 'SELECT * FROM modx_site_content WHERE `template` = '#'; //<-- Replace # with the ID for your Article Template (not ArticleContainer).

          4. When you get the Rows, for each one, find the 'properties' field.

          5. Scroll through the value until you find the old "tag" chunk name. Replace it with your new Chunk name (i.e. BlogTag). This is a non-formatted JSON type array, so it's a little bit of a pain. I think it is about 1/2 through the field.

          While you take care of that, I'll work on the Chunk and find the appropriate Snippet. [ed. note: fuzzicallogic last edited this post 14 years, 2 months ago.]
            Website: Extended Dialog Development Blog: on Extended Dialog
            Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
            Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

            Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
            • 38441
            • 140 Posts
            Thanks a lot,

            Re: The Moderator for Quip. It uses the Username of the User Accounts, not the email address.

            I did set the username the way you describe, but it seems to pull in another email address from somewhere else too. If i leave out the quip call that specifies a moderator it still uses an email address not listed for the given user (there's only one admin user set on the site from the manager).

            I'll work through your guide on tags and report the outcome.. there's a lot for me to get my head round since now in order to display the side-bar content throughout the rest of the site (and not just the page with the 'blog' on it), i have to create getResources, more templates, chunks.. etc. which is another new area to me.

            I picked up your message and hopefully we can continue the conversation re. modx and your thoughts on it, but i get what you're saying.
              • 3749
              • 24,544 Posts
              It might be faster to write a snippet to update that property - - something like this:

              $resources = $modxGetCollection('mod_resource', array('class_key' => 'Article'));
              
              foreach ($resources as $resource) {
                 $properties = $resource->getProperties();
                 $properties['whatever'] = 'newValue';
                 $resource->setProperties($properties);
                 $resource->save();
              
              }



              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              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
                • 39932
                • 483 Posts
                @BobRay:

                That's an awesome idea. It totally escaped me... (For some reason, while troubleshooting issues I forget that I can code to make the issue go away. Thanks, yet again!!
                  Website: Extended Dialog Development Blog: on Extended Dialog
                  Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                  Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                  Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
                  • 3749
                  • 24,544 Posts
                  Don't thank me until it works. wink


                  The resources object may not inherit a getProperties() method, in which case you'd have to use $resource->get('properties') and might have to use $modx->fromJSON() and $modx->toJSON() with the results.


                  ------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using.
                  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
                    • 39932
                    • 483 Posts
                    I reviewed the API as soon as you posted. getProperties() is indeed a part of modResource. Totally awesome. Now, to just get the property name and test the Snippet on Articles. smiley
                      Website: Extended Dialog Development Blog: on Extended Dialog
                      Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                      Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                      Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".