We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31624
    • 17 Posts
    :) Thanks for the patience, this is my first time getting really involved with MODx from a more dynamic standpoint and I am eager to use these features with clients in the future.


    #1) Reflect snippet, I’d love to learn this for future projects however I think it may be overkill for what is needed on my website. I am really curious why my code wasn’t working, I did everything as stated exactly from the wordpress like article...

    #2) This would require having a tv set up in each news article and then choosing which year correct? Then sorting by the year selected in the tv?

    #3) I set up the news articles into a folder for 2008 right now so lets go with this one to start.


    What I’d like to start with
    Let’s try to go to with #3 option right now since that is how I have the pages set up currently.

    You can see what is currently online at http://visim.local/news Right now I just have the 2008 link in the side col linking to the 2008 folder that displays all the news, I don’t have it set to only 2008 files which I need your help in figuring out. Which variables and what methods using the folder method will show files from that year.

    Here is how i have it laid out:
    - I have a document container for the News (4)
    - There is a document in the News container called 2008(76) that holds my news articles for 2008
    - Within this are the news articles, they have no set alias.

    The side nav as you can tell has 2008 and 2007, manually created links. It’d be nice to automate them so that 2009 automatically shows up when there is a 2009 folder (which is what reflect I am assuming is supposed to do) however reflect doesn’t work for me so manually setting a link once a year is ok for me. What do these links call to? Do they call to the specific year document which has code that displays the files for that year?

    Also how does the main news page work when showing files. I would assume that the main nav page will show 10 articles as I have it set and then paginate ones after that (I haven’t set pagination up yet, I just wanted to get the pages up) but how does it know to pull from all the years? Do I have to manually add each year folder (eg. 2007, 2008, 2009, etc)?


    Thanks!



    I may write a blog article about this when I figure all this out with your help, perhaps it may be help to some other people as well.
      • 27330
      • 884 Posts
      the best tip i can think of is installing the latest ditto and spending lots of time here:
      http://ditto.modxcms.com/files/snippet-ditto-php.html

      this is all basic Q’s for ditto. if you read the docs there you’ll learn a lot more than you think and it’ll give you new ideas as well.
      I use ditto religiously and RTFM is unavoidable sometimes even after using it daily smiley
        • 3749
        • 24,544 Posts
        Try using &parents instead of &startID. I believe that parameter name changed for newer versions of Ditto.
          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