We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28121
    • 107 Posts
    Hi all. Just wondering if anyone had tried the tutorial here called "Creating a Blog in MODx Revolution"
    and managed to get it working?
    http://rtfm.modx.com/display/revolution20/Creating+a+Blog+in+MODx+Revolution

    I’ve followed the instructions and my issue is

    1. Main Blog homepage doesn’t pull in any content from the Parent Folers it’s targetting
    2. My two main Sections won’t pull in any content either
    3. Archives page wotn pull in any content

    I have changed the resource IDs accordingly (Blog = 57) (Personal Section = 55) (Technology Section = 56).

    I have downloaded all the required snippets and succesfully created a Blog Article / Post in each Section which I can successfully preview.

    A bit stuck as to what might be my issue. huh
      • 21767
      • 44 Posts
      When you would use the MODx Sample Site and change it as discribed then it should be possible to understand.

      I have a successful page now with that technics. See www.apriorist.de
        • 22019
        • 390 Posts
        Pretty sure it works, as that’s how I set my latest project up.

        Simple things first - make sure the blog post resources are published and are visible in menus. Also that any section / category indexes are marked as containers. Finally check that you have the correct template for the *index* pages (archives, blog home etc) - ie not the BlogPost template.
          Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
          • 28121
          • 107 Posts
          Thanks odeclas. I’ve tried all that...still working. It’s so frustrating. undecided

          Thanks fully, it’s not urgent so I may either try again in a few days or ask someone on the paid help section.

            • 22019
            • 390 Posts
            If you post the getResources calls and the templates that you’re using it should be an easy fix.

            getResources also has an undocumented debug feature - if you add &debug=`1` it will output the database query that it’s trying to construct (and say ’ERROR’ if it won’t work). Another getResources trick is to call it without a template, which outputs a raw array - again useful for diagnosing if the problem is in the template or somewhere else.

              Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
              • 28121
              • 107 Posts
              Hi all
              Quick update in case anyone is having the same problem. I was in touch with Shaun and he pinpointed the problem which was...that ’TinyMCE was adding
              tags into your Snippet call’.

              Hope that helps someone else in future
                • 4653
                • 30 Posts
                I also have my problems with the tutorials. Perhaps someone can help me.

                I try to explain my problems:

                1. I create my "BlogPostTemplate" Template.
                <html>
                [[$pageHeader]]  
                <body>
                <div id="container">
                  <!-- begin of header --> 
                 [[$Banner]]
                <!-- end of header -->
                    <div id="container_content">
                      <div id="logo"><a href="index.php"><img src="../assets/img/logo.png" /></a></div>
                [[$pageNavigation]]  
                    </div>
                      <!-- begin of content -->
                      <div id="content" class="blog-post">
                       <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=`27`]]`]] |   
                  <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=`27`]]</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`  
                    ]]  
                  </div>  
                      </div>
                  <!-- end of content -->
                      <div id="kamp_link"><img src="../assets/img/meinung.png" /></div>
                    </div>
                <div id="bottom">
                  <div id="container_bottom">[[$shareforfoodfooter]]</div>
                </div>
                </div>
                </body>
                </html​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
                



                after that i did my templateVaribale for Taging.

                2. I create my "tags" TV and give Access for the Template "BlogPostTemplate and my Std. Template".

                So I create only one Section Name "blogAll".
                3. Creating my Section "blogAll" ID 26. I put it als container and choose my Std. Template.
                [[!getResourcesTag?  &element=`getResources`  &elementClass=`modSnippet`  &tpl=`blogPost`  &hideContainers=`1`  &pageVarKey=`page`  &parents=`[[*id]]`  &includeTVs=`1`  &includeContent=`1`]][[!+page.nav:notempty=`<div class="paging">  <ul class="pageList">    [[!+page.nav]]  </ul>  </div>`]]
                


                4. I made 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=`27`]]
                </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>
                


                5. I creat my Home Blog Site. It is document of a parent(ID5) and i called as Blog(ID27) i use my std. template and i put the following code in the resource content:
                [!getResourcesTag?  &elementClass=`modSnippet`  &element=`getResources`  &tpl=`blogPost`  &parents=`26`  &limit=`5`  &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>`]] 
                


                I tred to do my first Blog.

                6. I made a new document as a parent from blogAll (26) with the name First Blog (28) choose the Template "BlogPostTemplate" and in the TV i put some Tags.

                Now, when i click on the Blog (ID27) there is coming only the code of the content Blog 27.
                I think the connection from Blog ID27 to the Post ID28 is not working.

                Have someone any idee?

                all the best
                Carol
                  • 22019
                  • 390 Posts
                  Checking one simple thing - that last bit of code under 5. only has one opening square bracket... should be [[!getResourcesTag? and not [!getResourcesTag

                  Is this your structure:

                  -5
                  --Blog All (26) - with standard template
                  ---Blog post (28) - with blogpost template
                  --Blog (27) - with standard template

                  ?? It’s a bit hard to follow from the way you’ve described it. What do you see on page id 26?

                  Two other simple checks - is 28 published and shown in menus?

                    Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                    • 4653
                    • 30 Posts
                    hello odeclas,

                    thanks for trying to help me. i understand you, it’s no easy to explain what exactly is the problem because i don’t really understand what i’m doing.

                    here is my structure:

                    web
                    -de
                    --(5)
                    ---Blog(27) this should be the home site of the blog!
                    -blogAll (26) {for the categories}
                    --First Post (28) should finally display on the blog

                    i fixed the [ on the step5. but sill when i click on the Blog(27) there is coming nothing.

                    template structure:

                    Blog (27) std. Template | not as container
                    blogAll (26) std. Template | as container
                    First Post (28) BlogTemplate | not as container

                    Pubishing structure:
                    Blog (27) is published | i see no content
                    blogAll (26) is published | i see no content
                    First Post (28) is published | i see the Post with the content and the comment function!

                    i hope you can follow me now better.
                    cheers carol
                      • 22019
                      • 390 Posts
                      Had a look through and compared to my working version and I can’t see anything majorly different. I nest my category sections within my blog but that shouldn’t have any impact.

                      I can only think of simple things (apologies if this seems trivial) :
                      1. Both the pages that aren’t displaying content use the blogPost chunk template, so make sure you’ve named the chunk ’blogPost’.
                      2. Have you installed the getResources package? Does it work elsewhere?
                      3. Have you tried clearing the cache? It’s my default behaviour now when something doesn’t work to empty the cache first.
                        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86