We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13622
    • 74 Posts
    What in the world am I doing wrong...its driving me nuts. I can’t tell you how many hours I’ve wasted.

    So I have an piex displaying a rss feed, which works when I use the default template chunks for the header and footer. But I don’t want a header or footer, and obviously piex defaults to html code for the header & footer when they are not specifiied. So I tried creating blank chunks and specifying them as the template, but it causes an internal server error (500) when I do.

    Here’s my call:

    [!pieX? &url=`http://feeds2.feedburner.com/RealtororgPressRoomHeadlines` &item=`blog_entry` $header=`blog_header` $footer=`blog_footer`!]


    1. I’ve tried specifying $header/footer = `` - didn’t work
    2. I’ve tried creating empty "blog_header" & "blog_footer" chunks - didn’t work.
    3. I’ve tried putting basic html
    <p></p>
    into "blog_header" & "blog_footer" chunks - didn’t work.
    4. I’ve tried editing the snippet and removing the html that is automatically inserted. - didn’t work.

    Does anyone have a clue what I’m doing wrong? Thank you for the help and the end to my pain... smiley
      • 22303 MODX Staff
      • 10,725 Posts
      Jason:

      Your call looks incorrect:
      [!pieX? &url=`http://feeds2.feedburner.com/RealtororgPressRoomHeadlines` &item=`blog_entry` $header=`blog_header` $footer=`blog_footer`!]

      it should be:
      [!pieX? &url=`http://feeds2.feedburner.com/RealtororgPressRoomHeadlines` &item=`blog_entry` &header=`blog_header` &footer=`blog_footer`!]
        • 13622
        • 74 Posts
        Thank you for the suggestion. I did type it in wrong. Still doesn’t work. I get an Error 500 everytime.

        Good catch though...I had to read over it several times to notice the difference. I must have typed it in wrong the last time.

        Any other suggestions? Thanks again...

          • 22303 MODX Staff
          • 10,725 Posts
          Check the system event log in the manager or if your host has php error logging turned on, check that log file as well.

          I’m still not sure I understand what you are trying to do or maybe I could be of more help. Particularly, the part about
          But I don’t want a header or footer, and obviously piex defaults to html code for the header & footer when they are not specifiied
          is confusing me. What other format would you want to render the entries from the RSS feed in if not HTML?
            • 13622
            • 74 Posts
            Hi Jason,

            Thanks for your help. I really do appreciate it. I hope once I get good enough with Modx I can be as helpful as you have been.

            Anyhow, all I’m trying to do is take an rss feed and reformat the output to use on my website. Piex by default has templates which format the output. There are three templates: Header, Footer and Item. I’ve created an item chunk with the placeholders I want and the formatting I want...looks great. I just don’t want the header or footer to insert any code, which as I mentioned does so by default.

            I’ve tried:

            1. Specifying no template (ie. &header=``)
            2. Using template chunks w/ nothing in them.
            3. Using template chunks w/
            and <p></p>.
            4. Revising the php code.

            Thanks again for any of your suggestions. I’ll also see if my internet host has error logs I can examine.
              • 3749
              • 24,544 Posts
              I looked at the PieX Wiki page and I think I get your point now: PieX puts it’s own header and footer around the content and you don’t want them.

              I don’t see any reason why creating your own empty chunks (or at least chunks with just an &nbsp; in them) wouldn’t work. If it doesn’t, I’d try leaving out the &header and &footer arguments and editing the default header and footer (if you can find them). I’d suggest using the default &item chunk (by leaving that out too) until you get the header/footer thing figured out.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 13622
                • 74 Posts
                I know! I thought of that as well.

                And here’s what I’ve been able edit in the snippet and it sill functions:

                1. The footer will work with nothing in it: ($param["footer_tpl"]= isset ($footer) ? $modx->getChunk($footer) : ’’;)
                2. The header NEEDS a placeholder in it: ($param["header_tpl"] = isset ($header) ? $modx->getChunk($header) : ’[+title+] ’;)

                If it remove the [+title+] I will get the Error 500. I can change it to only a few other placeholders, otherwise it causes an error.

                What I might do now is just enclose the placeholder in a span tag and either set the display to none, or move it off the page.

                Thanks again for your help...I’ve really been loving modx and can’t wait to see the next version! I wish I knew more, so I could help out.
                  • 3749
                  • 24,544 Posts
                  Quote from: jasonimani at May 02, 2009, 10:49 AM

                  I know! I thought of that as well.

                  And here’s what I’ve been able edit in the snippet and it sill functions:

                  1. The footer will work with nothing in it: ($param["footer_tpl"]= isset ($footer) ? $modx->getChunk($footer) : ’’;)
                  2. The header NEEDS a placeholder in it: ($param["header_tpl"] = isset ($header) ? $modx->getChunk($header) : ’[+title+] ’;)

                  If it remove the [+title+] I will get the Error 500. I can change it to only a few other placeholders, otherwise it causes an error.


                  Just to be clear (and thorough), you’ve tried all of the following with no &header parameter and it gives the Error 500?

                  $param["header_tpl"] = isset ($header) ? $modx->getChunk($header) : '';
                  $param["header_tpl"] = '';
                  $param["header_tpl"] = ' ' ;
                  $param["header_tpl"] = '  ' ;
                  
                  
                  
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 13622
                    • 74 Posts
                    Hi Bob,

                    It looks like the second option that you suggested worked! Very cool...Thank you. Here’s the result:

                    http://www.jasonimani.com/Blog

                      • 3749
                      • 24,544 Posts
                      Quote from: jasonimani at May 04, 2009, 11:47 PM

                      Hi Bob,

                      It looks like the second option that you suggested worked! Very cool...Thank you. Here’s the result:

                      http://www.jasonimani.com/Blog

                      Hmmm. . . If that works, then leaving out the header parameter altogether in the snippet call should work fine with the original snippet code. huh

                      You should give that a try since it won’t be overwritten if you upgrade the snippet.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting