We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 364
    • 32 Posts
    in doing a basic blog using the example from the modx page http://rtfm.modx.com/display/revolution20/Creating+a+Blog+in+MODx+Revolution

    Everything was copy exactly, I found that i could not get anything on the page to load. after a hours of playing around wondering if i did something wrong i found if i removed the ! in the getresources call, things worked..

    using revo 2.0.8pl with the modx boiler plate, with site5 hosting.

    below is what the modx page says to use.
    [[!getResourcesTag?
      &elementClass=`modSnippet`
      &element=`getResources`
      &tpl=`blogPost`
      &parents=`43`
      &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>
    `]]


    this is what i use.
    <div id="Blog_Content">
    [[getResourcesTag?
      &elementClass=`modSnippet`
      &element=`getResources`
      &tpl=`blogPost`
      &parents=`43`
    &showHidden=`1`
    ]]
    
    [[!+page.nav:notempty=`
    <div class="paging">  
    <ul class="pageList">  
      [[!+page.nav]]  
    </ul>  
    </div>
    `]]
    
    <br>
    <br>
    
    <h2>Archives</h2>
    <ul>
    [[!Archivist? &target=`48` &parents=`43`]]
    </ul>
    
    </div>
    
    
    If i put in the ! my base template gets ignored
    [[$site_header]]
    [[*content]]
    [[$sitefooter]]
    ,

    it will get to the meta data of the header, and then just insert the code from the getResourcesTag call.

    this also happened with the Archivist call, but a bit diffrent.. it would call the Archivist page i would made first, then then [[$site_header]] then the rest of the content....

    huh i think i just figured out what is causing the issues...
    the boilerplate has a item in the header
    <meta name="description" content="[[*introtext:empty=`[[*content:strip_tags:strip]]`:limit=`200`]]"> 


    i was having the code inserted right after the content=" not sure what [[*introtext:empty=`[[*content:strip_tags:strip]]`:limit=`200`]] is all doing... but it is definatly causing uses.


    i guess i will try the right way to do the blog post with that line removed and see if i can have the calls made uncached properly, posting just since i spent way to much freaking time trying to get things to work...


      • 364
      • 32 Posts
      i went back to the blog demo, copied everything copy exactly over, and had that one line removed in my header from the boilerplate.
      <meta name="description" content="[[*introtext:empty=`[[*content:strip_tags:strip]]`:limit=`200`]]">


      bingo, everything works as it should....... i wish i found this 5 hours ago..... oh well, lesson learned on trouble shooting why code is getting injected, inside of my header... double check the header... and do some commenting out...

      oh well hopes this helps people. noticed alot of people were having the same issues i was.


      then next up.. figuring out how to build a gym’s schedule, based on info from the classes/ instructions bios page........
        • 21838
        • 284 Posts
        If you call it cached (getResources) it works fine. I don’t really know why. Let’s see if anyone knows why getResources makes trouble when calling uncached.
          MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
          • 364
          • 32 Posts
          yeah, i figured that it was working some what cached, though the tags no longer worked right, and a few other little things it was also messing with quip and archivist as well.
            • 21838
            • 284 Posts
            Quote from: acidic at Aug 02, 2011, 01:58 AM

            yeah, i figured that it was working some what cached, though the tags no longer worked right, and a few other little things it was also messing with quip and archivist as well.

            So it seems to me that either getResources has some issues or the output-filters don’t work properly.
              MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)