We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22019
    • 390 Posts
    Ah - and one thing from your structure - if you’ve created a ’de’ context, then you’ll need to add that to your getResources calls....
      Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
      • 4653
      • 30 Posts
      hmm strange.
      I installed the getResouces package but i only need for this blog. but i think it work.
      i also cleared the cash but with any good result ;-).

      my Blog Home Site has the ID 27 so i have to set here
      in the Content of ID27
      &includeContent=`1`
      

      to 1 or to 27?

      all the best
      carol
        • 4653
        • 30 Posts
        sorry, perhaps a stupid question. but how can i add the "de" to the getResources calls?
          • 22019
          • 390 Posts
          Have you created another context? You would add &context=`de` to the getResources call. The documentation says it defaults to ’web’ if it’s not given a parameter.

          [[!getResourcesTag? &elementClass=`modSnippet` &element=`getResources` &tpl=`blogPost` &parents=`26` &limit=`5` &includeContent=`1` &includeTVs=`1` &showHidden=`0` &hideContainers=`1` &cache=`0` &pageVarKey=`page` &context=`de`]]


          PS If you ever want to say what properties you can give a snippet, you can drag it from the element tree into a content area (it will show a little green tick) - drop it and it will open the full set of properties as a table - this is often useful for checking things.

          PPS Tested all your code on my system and it’s all fine, so that’s the only thing left I can think of, if you’re positive 28 is not hidden from menus.
            Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
            • 22019
            • 390 Posts
            For anyone else who was reading this thread, the solution turned out to be that the snippet had been copied into the resource content in richtext mode, so it wasn’t executing properly, ie the & was being interpreted as & so getResources wasn’t working properly.

            So, another little thing to add to the list of simple checks:

            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.

              Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
              • 4653
              • 30 Posts
              thanks odeclas for you help.

              my blog is working almost fine but I’m so sorry i have still some little bugs in it and of cours i don’t know why :’( .

              after I click on "read more" I jump to the full Blogpost called "First-Blog.html" with the comment function and so on. That’s good but:
              On this page "First-Blog.html" my Navigation chance to "First Blog" instead of my Wayfinder call. "Home - Projects and so on"

              Tpl for First Blog is the "BlogPostTemplate" .

              all the best carol
                • 22019
                • 390 Posts
                Hi Carol,

                I think the relevant bit of the blogPost template is

                [[$pageNavigation]] 


                so you need to check what the getResources call in the pageNavigation chunk is set correctly - sounds like parents might be set to the current document (or is at least incorrect).

                  Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                  • 4653
                  • 30 Posts
                  i had the same issue but
                  this is my code in the chunk:
                  <div id="navigation">
                  <div id="mainnav">
                    [[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`1`]]` &level=`1` &outerTpl=`menuContainer` &excludeDocs=`24`]]
                  </div>
                  <hr class="color" /> 
                  <div id="subnav">[[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`3`]]` &outerTpl=`menuContainer` &outerClass=`nav_space`]]
                  </div>​
                  

                  and on the other pages it works perfect.

                  that’s normal?
                  cheers carol
                    • 4653
                    • 30 Posts
                    sorry I’m still trying to fix my getResources call in the [[$pageNavigation]].
                    At the moment i don’t have a getResource call in this chunk. Only the Wayfinder menubuilder.

                    Is that wrong?

                    all the best
                    carol
                      • 22019
                      • 390 Posts
                      Sorry - I confused myself looking through the sample site code again (Wayfinder is what you want).

                      Why do you have two Wayfinder calls in that chunk? Do you have two separate menus in that area?

                      I don’t use UltimateParent myself, so I don’t know what you’re doing wrong, but I’d suggest changing the value of toplevel=3 in that second one (or simply fixing ’startid’ to the resourceId that you want as it won’t change - unless you re-arrange your top level).

                        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86