We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    Merci Aour!
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 18397
      • 3,250 Posts
      That message appears when the NewsListing placeholder parser starves for values. I have added debug messages to the script to specify user actions needed to correct the problem. Check the first post of the updated version now.
        • 18397
        • 3,250 Posts
        NewsListing Version 5.2

        Added a few debug messages and some conditionals.

        Added hiddentv, allowing filtering by a variable not in the template.

        Quote from: xeres at Jan 04, 2006, 11:22 AM

        What is axactly include and exclude filtering? May I have an exemple of how tu use it.
        Can I use this feature to display only some selected news?

        Thanks

        Yes and yes. Here is an example of both include and exclude filtering. Say you have a tv called year. Now include filtering would be if you only wanted to show news items from the year 2002 (don’t ask me why (lol)) and exclude filtering would be if you wanted to show everything except news in 2004.

        You use the filter paramer to do this.

        It is called in this format:

        &filter =`document_object_or_tv_with_tv_prefix, criteria, filtertype `


        Note that filtertype can be either mode 1 or 2. mode 1 shows only the items that meet your criteria and mode 2 shows all items except those that meet your criteria. The default is mode 1 if none is specified.

        Hope this helps!
          • 25663 MODX Staff
          • 12,272 Posts
          Mark, give us a real call, non-documentation, example please. What’s an example of valid criteria, for example. Thanks!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 18397
            • 3,250 Posts
            Sorry, CSI was on...

            &filter=`tvreadingdate,11232005,1` is a real call

            The filter is the template variable reading date (note the tv prefix), the value that it must be is 11232005, and because I want it to only show items that have that value I chose mode 1.

            I hope to be able to get the snippet to work with >= <= < > operators soon as well.

            Hope this helps!
              • 25663 MODX Staff
              • 12,272 Posts
              I assume "11232005" means Nov 23, 2005"? If so, logic operators will be important here for sure. Thanks!
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 18397
                • 3,250 Posts
                Correct
                  • 9583
                  • 25 Posts
                  Okay, I’ve finally had a free moment to catch up with what’s been going on with this snippet, and I declare that this is officially "teh awesome"!  laugh

                  I’ve got one feature request, low priority:  I’d like to be able to define different &tpl chunks for different "type" values -- "document" or "reference".  What might also be handy is a way to also have a &tpl for anything that "isfolder" as well, though I don’t specifically need that at this time.

                  The only thing I’m still trying to figure out is how I’d be able to get at a TV of a document’s parent.  Essentially, I want to display "category" icons for each entry’s summary, and I don’t necessarily want the sumbitters to have free reign in adding those TVs to individual documents.  I just saw the "@INHERIT" binding in the docs, but haven’t really gotten my head around bindings yet.  Is this the direction I should be heading in?

                  I’m sooooo close now.  All I need is forum/gallery integration...   grin
                    • 18397
                    • 3,250 Posts
                    Quote from: Fellini at Jan 06, 2006, 10:52 AM

                    I’ve got one feature request, low priority: I’d like to be able to define different &tpl chunks for different "type" values -- "document" or "reference". What might also be handy is a way to also have a &tpl for anything that "isfolder" as well, though I don’t specifically need that at this time.

                    Consider it on my todo list. smiley As to "get at a TV of a document’s parent" there is a snippet floating around that does just that. The @INHERIT is the same thing except less processing needed.
                      • 18397
                      • 3,250 Posts
                      NewsListing Version 6.1

                      NewsListing is now RSS capable meaning all of the features of NewsFeed are now included in NewsListing just by calling &format=`rss` in the snippet call. Make sure your document has the blank template and text/xml content type first though!

                      Additionally, I moved alot of the repetative code into functions and placed them in functions.php which goes in assets/snippets/newslisting/functions.php. This should improve performance and some of these functions will eventually make it into the API once they are refined.

                      moderator: here’s the file and make sure to remove the opening "<?"