We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4463
    • 26 Posts
    Is it possible to call the newslisting snippet twice in the same page? I want to use the newslisting snippet to display news in the front page with 2 posts summarized, which will be the "highlights" that the administrator will have to be able to choose from all the news published, and the archives post sorted by pub_date. I was thinking if is it possible to sort the posts by menuindex so that when we want to highlight some posts we just assign it an higher menuindex? If so I’ll have two calls of the newslisting snippet in the same page (one for the summarized ones sorted by menuindex and the for the archives sorted by pub_date ? I Think there isn’t a option to sort the posts by menu_index... I’m I wrong? huh


      • 2762
      • 1,198 Posts
      Nicola (Banzai) Reply #282, 18 years ago
      Quote from: cadju at Apr 24, 2006, 12:18 PM

      Is it possible to call the newslisting snippet twice in the same page? I want to use the newslisting snippet to display news in the front page with 2 posts summarized, which will be the "highlights" that the administrator will have to be able to choose from all the news published, and the archives post sorted by pub_date. I was thinking if is it possible to sort the posts by menuindex so that when we want to highlight some posts we just assign it an higher menuindex? If so I’ll have two calls of the newslisting snippet in the same page (one for the summarized ones sorted by menuindex and the for the archives sorted by pub_date ? I Think there isn’t a option to sort the posts by menu_index... I’m I wrong? huh

      I never tested with latest 6.3.3 release, but sure works with previous release wink
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 18397
        • 3,250 Posts
        MARKSVIRTUALDESK Reply #283, 18 years ago
        Last time I checked it works with this and the 6.4 release (please try it smiley )
          • 4463
          • 26 Posts
          Quote from: Mark at Apr 24, 2006, 03:54 PM

          Last time I checked it works with this and the 6.4 release (please try it smiley )

          Thanks, i’ll try it... but where can I find the 6.4 release? Please post a link smiley
          • Garry Nutting Reply #285, 18 years ago
            Hi cadju, the link to NewsListing 6.4.1 beta is: http://modxcms.com/forums/index.php/topic,3873.0.html

            Hope that helps, Garry
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 4463
              • 26 Posts
              Hi cadju, the link to NewsListing 6.4.1 beta is: http://modxcms.com/forums/index.php/topic,3873.0.html

              Hope that helps, Garry

              Thanks Garry I’m using 6.4.1 now, but I still have the same problem: I can’t sort the listing by menuindex, I’m using the parameter &sortby=menuindex in the snippet call but it doesn’t return anything sad. Can someone test calling the snippet this way? smiley (with &sortby=menuindex)
                • 19220
                • 26 Posts
                Hi,

                I’m using 6.4.1, but this seems to be the active thread. I have articles stored in different folders and I’m using one of the default templates from the tutorial as my NewsListingTemplate:

                <div class="nl_summaryPost">
                <h3><a href="[~[+id+]~]">[+title+]</a></h3>
                <div>[+summary+]</div>
                <p>[+link+]</p>
                <div style="text-align:right;">by <strong>[+author+]</strong> on [+date+]</div>
                </div>

                I’d like to list the category of the article (i.e. folder) in there as well. Is there an obvious placeholder I can use? I tried
                <h3><a href="[~[+id]~]">[+title]</a> ([+folder+])</h3>

                and similar things, but eventually ran out of guesses.

                Thanks,

                -michael
                  • 18397
                  • 3,250 Posts
                  MARKSVIRTUALDESK Reply #288, 18 years ago
                  @cadju: Just verified: it works just fine.

                  @mglerner: No, you need to use a separate snippet for that. I actually wrote exactly what you need for the main MODx site. Please PM me to remind me to post it tonight (Its at home... sad )

                  Please keep NewsListing 6.4.x related questions in the relevant thread. It makes keeping track of things much easier
                    • 19777
                    • 35 Posts
                    Hi there,

                    I’m slowly moving a website from Textpattern to Modx. I’m using Newslisting 6.3.3 on 0.9.2.1. One of the questions I have, is it possible assign alternating chunks to the Newlisting output?

                    I would like to have the following HTML output:

                    <div class="left">
                    <h2><a href="SomePermalink" title="Permanent link to this article">Article 1</a></h2>
                    <p class="author">Category 1 | Author | Date</p>
                    <p>Some summary. <a href="#" title="Permanent link to this article">More</a></p>
                    </div>
                    
                    <div class="right">
                    <h2><a href="SomePermalink" title="Permanent link to this article">Article 2</a></h2>
                    <p class="author">Category 2 | Author | Date</p>
                    <p>Some summary. <a href="#" title="Permanent link to this article">More</a></p>
                    </div>
                    
                    <br style="clear: both;" />


                    This would alternate down a page - so that Article 1 is the left of a page, Article 2 is on the right of the page, followed by <br style="clear: both;" />. Then on the next line Article 3 would be on the left, Article 4 on the right, followed by <br style="clear: both;" />. So on and so on until it reaches the designated number of posts for that page.

                    With Textpattern it is really quite simple, just write something like:
                    <txp:article_custom offset="0" limit="2" listform="excerptlist" />
                    	<br style="clear:both;" />
                    	<txp:article_custom offset="2" limit="2" listform="excerptlist" />
                    	<br style="clear:both;" />


                    Is there some way of doing this in ModX and Newslisting?

                    Cheers

                    Mark
                      • 18397
                      • 3,250 Posts
                      MARKSVIRTUALDESK Reply #290, 18 years ago
                      Yes, NewsListing 6.4 can do this.