We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4095
    • 372 Posts
    Quote from: Mark at Dec 06, 2005, 09:39 PM

    Ummmm. Briggsys thats your own html surrounding the placeholders.

    This works flawlessly for me (with no #pages div anymore):


    I don’t have a place holder called #pages and never have had, so its coming from somewhere else.

    I just tried to cut and past the snippet again to see if it went wrong in the copy n paste, and now I remember. The snippet started with <? and that gave a PHP Parser error. I thought I hadn’t pasted it correctly so I deleted the <? the first time and it worked fine, but has the #pages reference.

    Just downloaded the snippet again and noticed the <? was in there on the first line, which gives me an error saying unexpected <

    If I remove it again, it works, but still with that #pages reference

    The page sits in a container called "content" as per below


            <div id="content">
                [*content*]
                <quickedit:content />
             </div>   


    When the news page is loaded it calls the code

    [!NewsListing? &startID=`11` &summarize=`4` &sortby=`pub_date &paginate=`1` &tpl=`NewsSummary` &pubOnly=`true`!]
    
    Displaying articles [+start+] - [+stop+] ([+total+] total)
    [+previous+]  [+pages+]  [+next+]



    I use the following chunk style the summary

    <div class="NewsSummary">
        <span class="left">   
            <a href="[~[+id+]~]">[+title+]</a>
        </span>   
        <span class="right">
            [+date+]
        </span>
    </div>
    <br />
    <p>
        [+summary+]
    </p>
    <p>
        [+link+]
    </p>
    <br />


    And lastly the CSS, which has the reference to "pages" otherwise it doesn’t work

    /*                      */
    /*NEWS LISTING*/
    /*                      */
    .NewsSummary span.left {
        margin: 0;    
        border-left: 0.5em #FFFF99 solid;
        border-bottom: 0.2em #b1d5ed solid;
        padding-left: 0.5em; 
        padding-bottom: 0.2em; 
        float: left;
        text-align: left;
        width:72.56%; /*2.44% is used up by padding etc. Spans can't overlap*/
        font-weight: bold;
        }
    .NewsSummary span.right {
        margin: 0;    
        border-bottom: 0.2em #b1d5ed solid;
        padding-bottom: 0.2em; 
        float: right;
        text-align: right;
        width: 25%;
        font-size: 1.0em;
        font-weight: normal;
         }
    #pages a{
        padding:0 5px 0 5px;
        }
    #nl_currentpage{
        font-weight: bold;


    As you see, I have no user DIV referring to #pages, so wonder why <? cause’s an error, and when removed it brings back #pages reference.
      [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
      Admin Sandbox Login: sandbox Password: castle
      • 18397
      • 3,250 Posts
      NewsListing Version 4.3.1

      Ooops! I left the <? in there again......... Programmers Notepad.......
        • 18397
        • 3,250 Posts
        Briggsys: Instead of using
        Displaying articles [+start+] - [+stop+] ([+total+] total)
        [+previous+]  [+pages+]  [+next+]
        


        Use this (make sure you paste it in source view if you are using an RTE)

        Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles<br /><div id="nl_pages">[+previous+] [+pages+] [+next+]</div>
        
          • 4095
          • 372 Posts
          Ahhhm, theres the offending reference, hadn’t registered it was added in there. Thats the problem with cutting and pasting while you learn... not always sure what your doing or why.

          Thanks for your Patience (again)

          :)
            [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
            Admin Sandbox Login: sandbox Password: castle
            • 18397
            • 3,250 Posts
            Anytime.
              • 27509
              • 22 Posts
              my trunctext text did not display after I updated to version 4.3.1 (from version 2).
              I had to change line 398 from:
              		$link = '';
              to
              			$link = '<a href="[~'.$resource[$x]['id'].'~]">'.$linktext.'</a>';
              to get it working again.

                • 18397
                • 3,250 Posts
                I’ll look into this.
                  • 18397
                  • 3,250 Posts
                  NewsListing Version 5.1

                  New features:

                  multilevel/hierarchal support and both include and exclude filtering

                  Thanks go out to Jared for allowing me to use ListIndexer as a base for the multilevel code and Jason for practically writing the filtering code.
                    • 32847
                    • 171 Posts
                    It looks great, specialy multilevel

                    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
                      • 1876
                      • 835 Posts
                      Hi

                      I install the last version 5.1

                      and I have this message :

                      Error: Invalid argument supplied for foreach()
                      Error type/ Nr.: Warning - 2
                      File: /homepages/26/d141023526/htdocs/manager/includes/document.parser.class.inc.php(691) : eval()’d code
                      Line: 382

                      I go back to the version 4.4 and all it is OK

                      I call :
                      [[NewsListing? &startID='5']]


                      With debug
                      [[NewsListing? &startID='5' &debug='1']]


                      MODx encountered the following error while attempting to parse the requested resource:
                      « Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ’5’ ’ AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb »
                      SQL: SELECT DISTINCT sc.* FROM `tito`.modx_site_content sc LEFT JOIN `tito`.modx_document_groups dg on dg.document = sc.id WHERE sc.parent = ’’5’ ’ AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) ORDER BY sc.createdon DESC;

                      Aour