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

    I’m (still) trying to figure out how to make a blog with revo, using the documentation here:
    http://rtfm.modx.com/display/revolution20/Creating+a+Blog+in+MODx+Revolution

    I have a page that is supposed to show my blog posts.
    It uses my basic page template. In the resource content, I have this:

    [[!getResourcesTag?
      &elementClass=`modSnippet`
      &element=`getResources`
      &tpl=`blogPost`
      &parents=`[[*id]]`
      &includeContent=`1`
      &includeTVs=`1`
      &showHidden=`0`
      &hideContainers=`1`
      &cache=`0`
      &pageVarKey=`page`
    ]]
    [[!+page.nav:notempty=`
    <div class="paging">  
    <ul class="pageList">
    [[!+page.nav]]  
    </ul>
    </div>
    `]]
    


    When I visit the page that this code generates, I see the context of the blog entry, but not the entry itself.

    For each entry, I get the title, the meta information ("posted by") and a the "read more" and "comments" links generated by my chunk:
    <div class="post">
        <h2 class="title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
        <p class="post-info">Posted by [[+createdby:userinfo=`fullname`]]
     [[+tv.tags:notempty=` | <span class="tags">Tags: 
    [[!tolinks? &items=`[[+tv.tags]]` &key=`tag` &target=`1`]]
    </span>`]]</p>
        <div class="entry">
    	<p>[[+introtext]]</p>
        </div>
        <p class="postmeta">
          <span class="links">
    <a href="[[~[[+id]]]]" class="readmore">Read more</a>
    | <a href="[[~[[+id]]]]#comments" class="comments">
        Comments ([[!QuipCount? &thread=`blog-post-[[+id]]`]])
      </a>
    | <span class="date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</span>
          </span>
        </p>
    </div>
    


    If I’m on my blog page and I click "read more", it takes to a page with just that blog post on it, presented in the selected template. And the content is visible.

    If I understand the tutorial correctly, and from what I understand from the code on the tutorial, I should expect to see the content of my posts, published by getResourcesTag.

    What’s going on here?

    How can I publish the post content?





      • 25315
      • 68 Posts
      If I understand the tutorial, and documentation properly, then the content of each blog post should be returned, as determined by the ’includeContent’ property of getResources.

      This is set to ’1’ in the code in the tutorial, so I’m expecting the content to display.

      I set up a new install of modx from scratch on a local vhost, and walked through the tutorial again.

      I got the same result: the content of blog posts doesn’t appear on the blog page, or on the pages produced by previewing the resources for the tags. All other information (meta info, introtext) does get output.

      Possible causes of this:

      * I’m missing something small but vital to my expected outcome
      * I installed tinymce. Maybe it is interefering with the code I’m pasting in
      * Maybe something about getResources has changed since the publishing of it’s documentation or the publishing of the tutorial.

      I’m pretty stumped on this one.

      Any ideas on what could be going wrong?
        • 25315
        • 68 Posts
        bump
          • 36592
          • 970 Posts
          <div class="entry">
              <p>[[+introtext]]</p>
          </div>
          


          You are using introtext field in your template chunk.
          Are you sure you filled the introtext field of your blog article ?
            • 25315
            • 68 Posts
            Hi.

            When I do actually enter text into the introtext field, it does indeed get published.

            However, that’s not the problem I have.

            The problem I’ve been wrestling with is that the content of the blog article doesn’t get published.
              • 3749
              • 24,544 Posts
              Try adding this somewhere in the Tpl chunk:

              <p>[[+content]]</p>
                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
                • 3729
                • 32 Posts
                Quote from: BobRay at Oct 14, 2010, 09:36 PM

                Try adding this somewhere in the Tpl chunk:

                <p>[[+content]]</p>


                That does it.

                Thanks.