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

    yes i need for my navigation two wayfinder calls because of the two separate menus.

    It is so strange, in all other templates this chunks give the right solution only on the posts document
    i get the wrong output.

    I set any numbers in the toplevel without any better result ...
    should i set something with the getResources call?

    all the best
    Carol
      • 22019
      • 390 Posts
      Could you post some screenshots of it working on another page and what it currently displays on BlogPost?

      My method for doing something similar is very different, but I’m not clear from your description what your second menu should look like.
        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 19298
        • 76 Posts
        MichaelHarringtonDesigns Reply #23, 15 years, 10 months ago
        HI I am also having problems making the blog work, here is the link to the blog
        http://www.funusbdrive.com/blog.html

        1)I have created the “BlogPostTemplate” Template, I have added the footer and header chunk from the original template

        [[$funusbdrive_header]]
        <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=`14`]]`]] |
        <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=`14`]]</span>
        `]]
        <br class="clear" />
        </div>
        <hr />
        <div class="post-comments" id="comments">[[!Quip?
        &thread=`blog-post-[[*id]]`
        &replyResourceId=`123`
        &closeAfter=`30`
        ]]



        [[!QuipReply?
        &thread=`blog-post-[[*id]]`
        &notifyEmails=`[email protected]`
        &moderate=`14`
        &moderatorGroup=`Moderators`
        &closeAfter=`30`
        ]]
        </div>
        </div>
        [[$funusbdrive_footer]]

        2) After that I set up a Template Variable that we’ll be using for our Tagging, I create my "tags" TV and allowed Access for the Template "BlogPostTemplate and the original Template

        3) Creating my Section "Technology" ID 13, and "Personal" ID 12. I put it as the original template . Hiden from menu but is published then added this code to each/ the toggle editor was unticked to prevent &amp from showing
        [[!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=`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>

        5) I creat my Home Blog Site. It is document of a parent ID “14” i use my original template and I put the following code. Shown in the menu / and Published
        &amp; where added to the snippet but I removed them

        [[!getResourcesTag?
        elementClass=`modSnippet`
        element=`getResources`
        tpl=`blogPost`
        parents=`13,12`
        limit=`14`
        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>
        `]]

        6) I made a new document as “16” choosen the Template "BlogPostTemplate" and in the TV i put some Tags.

        I cannot get anything to display on the page can anyone help?, I keep looking over these points

        Possible reasons for a getResources failure to display as expected:
        1. Is the resource that getResources is looking for published?
        2. Is the resource that getResources is looking for hidden from menus (and not overridden in the getResources call)?
        3. Does getResources know which context to use (only relevant if you have more than one context)?
        4. Does the display chunk template _exactly_ match the tpl parameter name? (although I think you still get output if it doesn’t)
        5. Are you looking in the right place, ie is ’parents’ set correctly ([[*id]] for my own children, a resource id or id1,id2,id3 for specific folders)?
        6. Is the getResources code in plain text?

        Unless you’re calling getResources cached, it shouldn’t make any difference to empty the site cache, but it usually doesn’t hurt to do so.
          • 22019
          • 390 Posts
          Please clarify a couple of things:

          In 5. When you say you’ve ’corrected’ &amp; appearing in your getResources call, did you also disable or toggle off the richtext capacity for that resource?

          In 6 - where did you publish resource id 16? (And you have published it, right?). Can you preview (or see) this page displaying correctly?

          ===
          Unrelated:

          In 5, your limit parameter is wrong. It is not the resource_Id to return, it’s the total number of resources.
            Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
            • 19298
            • 76 Posts
            MichaelHarringtonDesigns Reply #25, 15 years, 10 months ago
            Hi odeclas thanks for your reply and help


            In 5. When you say you’ve ’corrected’ &amp; appearing in your getResources call, did you also disable or toggle off the richtext capacity for that resource?

            Yes the toggle Editor is unticked

            In 6 - where did you publish resource id 16? (And you have published it, right?). Can you preview (or see) this page displaying correctly?

            I have publish resource id 16 under the folder Technology “13”, I have attached a screen shot. (yes it is published) Yes I can also preview the document here is the link http://www.funusbdrive.com/first-customer.html
            Looking at this page I also need to enable the funusbdrive_midsection chunk.

            Unrelated:

            In 5, your limit parameter is wrong. It is not the resource_Id to return, it’s the total number of resources.
            Thanks for that I changed the code to:
            [[!getResourcesTag?
            elementClass=`modSnippet`
            element=`getResources`
            tpl=`blogPost`
            parents=`13,12`
            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>
            `]]

            Nothing appears still when I go to http://www.funusbdrive.com/blog.html sad
              • 22019
              • 390 Posts
              It’s not obvious what isn’t right - I can see that Resource 13 is displaying the blogPost chunk, and resource 16 is visible. So that would suggest that it’s neither your main template’s fault (as I assume you’re using it for 13 and 16) or the blogPost chunk itself (although the CSS needs updating). I would suggest that it’s one of the following:

              Either: the order that the parents are called in matters (ie it should be 12,13) - although this appears unlikely.
              Or: the combination of showHidden and ignoreContainers is confusing getResources into not returning anything, as 12 and 13 are both hidden and containers.

              But neither of these seem all that likely. It’s probably something trivial that isn’t easy to pick up on a forum - it would be easier to diagnose if gave me manager access for a brief while (send me a message)....

                Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                • 19298
                • 76 Posts
                MichaelHarringtonDesigns Reply #27, 15 years, 10 months ago
                Hi odeclas

                I have sent you a message
                  • 22019
                  • 390 Posts
                  Again, we’ve resolved (I hope) off-site, but for anyone following it was pretty obvious when you see it afresh - the parameters in the getResources call on page 14 (the main Blog index) weren’t being accessed as the ’&’ character had been stripped when correcting the rich text issue Carol had earlier.
                    Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                    • 19298
                    • 76 Posts
                    MichaelHarringtonDesigns Reply #29, 15 years, 10 months ago
                    I have a problem with the Tags in the blogPost chunk there is this code

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

                    The page title link does not go to the resource of that blog post.

                    This code works fine tho.
                    <span class="links">
                    <a href="[[~[[+id]]]]" class="readmore">Read more</a>

                    Reading this page http://splittingred.com/technology/2010/06/using-taglister-to-navigate-by-tags.html it sounds like I am not the only one with this problem.
                      • 3866 ☆ A M B ☆
                      • 350 Posts
                      Guess what I too am having trouble with setting up a blog - could have used Wordpress in half the time grin but really want to get this working within Revolution.

                      I have followed this thread and I’ve checked all my syntax etc and re-typed code to ensure ’&’ and not richtext alternatives. I already have getResources working elsewhere on site but I just cannot seem to get the blog to work..... >:(

                      I have created a ’Blog’ resources id 16 and reset in template the &target=`16`.
                      [[!getResourcesTag? &element=`getResources` &elementClass=`modSnippet` &tpl=`blogPost` &parents=`[[29]]` &limit=`5` &includeContent=`1` &includeTVs=`1` &showHidden=`0` &hideContainers=`1` &cache=`0` &pageVarKey=`page` debug=`1`]]
                      [[!+page.nav:notempty=`<div class="paging"><ul class="pageList">[[!+page.nav]]</ul></div>`]]

                      I have then created an resource id 29 as the container for all blog entries and I have ensured the default template is used for both these resources.

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

                      I have then created a post in the container using the Blog Template and published the resource. This resource can be viewed individually but does not show in the Blog (id 16) or in the container resource (id 29)

                      The debug shows nothing in error log.

                      Once again rather unsure what to try next! huh
                        Helen Warner
                        Number one pixel!
                        Proud to be linked with MODX at Crimson Pixel