We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22740
    • 26 Posts
    Hi. I am a front-end person and I have been trying so hard to set up modx. I tried to follow the steps to set up a blog using this tutorial http://rtfm.modx.com//display/revolution20/Creating+a+Blog+in+MODx+Revolution
    (I haven’t styled everything nor made the menu on the site yet; I want to see how the blog plays out first).
    I seem to have a blog running here: http://fruitflylife.com/index.php?id=4
    And I seem to have a post here: http://fruitflylife.com/index.php?id=8
    But the post doesn’t show up in the main blog page.
    I think I redirected the tagLister and toLinks to ID 4 instead of ID 1 in the chunk and and the template, but I have a feeling I may have missed something having to do with that.
    This is the blog stuff that I have in my template:
     <h2 class="title"><a href="[[~[[*id]]]]">[[*pagetitle]]</a></h2>  
         
       <p class="post-info">  
       Posted on [[*publishedon:strtotime:date=`%b %d, %Y`]] |   
       Tags: [[*tags:notempty=`[[!tolinks? &items=`[[*tags]]` &key=`tag` &target=`4`]]`]] |   
       <a href="[[~[[*id]]]]#comments" class="comments">  
        Comments ([[!QuipCount? &thread=`blog-post-[[*id]]`]])  
       </a>  
       </p>  
       
       <div class="entry">  
         <p>[[*introtext]]</p>  
         <hr />  
         [[*content]]  
        </div>  
       
       <div class="postmeta">  
         [[*tags:notempty=`  
     <span class="tags">Tags: [[!tolinks? &items=`[[*tags]]` &key=`tag` &target=`4`]]</span>  
         `]]  
         <br class="clear" />  
       </div>  
       <hr />  
       <div class="post-comments" id="comments">[[!Quip?  
           &thread=`blog-post-[[*id]]`  
           &replyResourceId=`123`  
           &closeAfter=`30`  
         ]]  
         <br /><br />  
         [[!QuipReply?  
            &thread=`blog-post-[[*id]]`  
            &notifyEmails=`[email protected]`  
            &moderate=`1`  
            &moderatorGroup=`Moderators`  
            &closeAfter=`30`  
         ]]  


    And this is what I have in my blogPost 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=`4`]]
    </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>


    MODx Revolution 2.0.6-pl2 (traditional)

    PHP Version 5.2.13
    CGI/FastCGI
    MySQL version 5.0 (I’m not not using localhost)
    Linux vux29 2.6.33.2-NETSOL

    Mac 10.4.11
    Firefox 3.0.19

    Thank you so much in advance for any help on this!
      • 22740
      • 26 Posts
      Sorry, here’s my info, as far as I can find out so far (It’s a wonder I know any of this):

      PHP Version 5.2.13
      CGI/FastCGI

      MySQL version 5.0 (I’m not not using localhost)

      Is this the server OS?: Linux vux29 2.6.33.2-NETSOL

      MODx Revolution 2.0.6-pl2 (traditional)

      My laptop:
      Mac 10.4.11
      Firefox 3.0.19
        • 22740
        • 26 Posts
        Ok I’ve been really trying to make this work, I’ve been at it all day. I don’t think it’s a bug, I think I’m just doing something slightly wrong.
        I realized I didn’t understand the blog posts are supposed to be just the post formatting without the overall site template, so I changed that -- It’s just like the blog post template in the tutorial. It works... http://fruitflylife.com/index.php?id=8
        But the problem is getting the post into the main blog page: http://fruitflylife.com/index.php?id=4
        I’ve tired both `1` and `4` for &includeContent=`` and &includeTVs=`` -- but I don’t understand if those numbers are for the pageIDs or not (I DO understand that I have to change the targets to `4` in the tolinks snippet).
        [[!getResourcesTag?
          &elementClass=`modSnippet`
          &element=`getResources`
          &tpl=`blogPost`
          &parents=`5,6,7`
          &limit=`5`
          &includeContent=`4`
          &includeTVs=`4`
          &showHidden=`0`
          &hideContainers=`4`
          &cache=`0`
          &pageVarKey=`page`
        ]]
        [[!+page.nav:notempty=`
        <div class="paging">  
        <ul class="pageList">  
          [[!+page.nav]]  
        </ul>  
        </div>
        `]]

        I had to change my parents IDs from what the tutorial had as well.
        I feel like it’s one little thing I don’t understand.
        I’m going to donate to modx as soon as this works!
          • 22740
          • 26 Posts
          Figured it out! Totally duh... just had to select a parent / category for the blog post. For some reason I thought the tags did that.