We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36860
    • 21 Posts
    Hi,

    I have tried several times to create a blog in Revo, I have read the "Creating a Blog in MODx Revolution" and followed the instructions, but I still don't have a working blog. I am getting really confused by the how to, is there anyone that can make an easier how to or at least explain a few things.. like

    1) Creating the Sections - what do they mean sections? I know of documents, templates, snippets, chunks, and other stuff, but what is a "section"? I get that it is a container, and so I presume I create a document in the root and make it a container.

    2) I don't get the blogPost chunk at all... when I make it, it looks like it has some errors in it, but I am not 100% on it. Like [ [ +pagetitle ] ] isn't it supposed to be [ [ *pagetitle ] ] ? it looks like the calls are wrong too because it uses the ~ in some of them... but maybe I just haven't seen it used before (I really count myself as a begginer with Modx... and I am sure you would not disagree).

    3) In "Setting up Your Blog Home" it is using ID 1... but there are 3 different places in the getResourcesTag that have an ID of 1... includeContent, includeTV, and hideContainers. It also mentions "tolinks" and "tagLister" but I haven't used those and get lost there too.

    4) "Adding Posts" - It says to make a new "Resource" (I'm again assuming "new document") with the template "BlogPostTemplate" and that I should specify "tags" TV.... 100% lost in this one... I know a TV is a template variable, and I know I have a TV called "tags", but am I creating a TV on the "BlogPostTemplate" or using the one that was already present in the system (I think might have been set up from "Modx sample site" but again not 100% on that).

    As of right now I have the Comments section visible on the posting page, and nothing else... I know I have done some wrong things, so I don't know how to fix what I have to make it work. All the code I used is copy/paste from the original article, with a few changes in ID #'s (they used 34 35, I use 63 64, etc).

    I know it's probably asking a lot, but can someone please help me make sense of all this?
      • 3749
      • 24,544 Posts
      That's a lot of questions, but this may help.

      I think your interpretation of "sections" is correct.

      The number used for the value of things like includeContent and hideContainers is not an ID. It's either 1 or 0 (meaning yes and no). IOW, &includeContent=`1` means "yes, I'm going to show the content field, so include it and &includeContent=`0` means the opposite.

      The &parents property value(s) are the IDs of resources you want to show the children of(i.e., sections).

      The &includeTvs property value is the IDs of the TVs you're going to show.

      New Resource does mean New Document.

      If you have a TV called "tags" you don't need to create another one, but you do need to make sure it's attached to the BlogPostTemplate.

      When you use a tag like this:

      [[*something]]


      It will always show the value for the current document. That's not what you want for a listing of blog posts because you want the values from many different documents. In a Tpl chunk, you always use this form:

      [[+something]]


      Tags that start with the + token are placeholder tags. The snippet that retrieves the documents (e.g. getResources) will replace them with the field from each document as it retrieves them.

      The tags that start with a ~ are link tags. They get converted to URLs So the example below is a placeholder tag inside a link tag:

      [[~[[+id]]]]


      The inside tag will be replaced with the ID of the resource (document) and the outer tag will then be replaced with the URL of that document. So the tag will be converted first to something like this:

      [[~12]]


      Then to something like this:

      http://alias-of-document-12


      So if you have a document titled "Home Page" with an alias of "home-page", when the snippet retrieves that document this:

      <a href="[[~[[+id]]]]>[[+pagetitle]]</a>


      Will get converted to this:
      <a href="http://home-page.html">Home Page</a>


      If none of that solves your problems, post the full snippet tag you're using to retrieve the blog posts and the code of the Tpl chunk it uses.

      [ed. note: BobRay last edited this post 15 years ago.]
        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
        • 36860
        • 21 Posts
        Thank you. I did a fresh site with minimal stuff and tried going through the "tutorial" again. I think I have it down now, "Sections" does mean "new document". Everything else was just more of a confusion issue since I was working with an established site and when I did this load there wasn't anything to confuse with other things / existing tpl's and such.

        I got all the way through the tutorial and got to the part about quip, and when I went to test the comment part it told me that a "moderator" would have to approve it. I had already setup the mgr group that was described, but it doesn't tell me where to go to look at quips or where to approve them....any tips on where that might be or how to approve them?

        Thanks for all the help.

          • 3749
          • 24,544 Posts
          Click on Quip on the Components menu. There should be an "unapproved comments" tab.
            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