We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8642
    • 28 Posts
    Here’s the problem: I have a client who’s setting up an on-line monthly magazine. There’ll be lots of authors contributing to it, and they’ll all have their own folder to store their respective articles in. The client wants me to build a menu where the authors are sorted alphabetically, and I’ve done that with Wayfinder. So far so good.

    Now he also wants the folders that contain articles from the current month to be in a different color in the menu.

    I can’t figure out a way to do that with Wayfinder and I suspect that Ditto is the most likely candidate for a ready-made tool to create such a menu, but I’m not really sure if it’s up to the task.

    Has anyone ever done anything like this before with Ditto? Will you tell me how you did it? Please? I sure hope you have and will, ’cause I really don’t want to hack my own little snippet to do this single thing.

    By the way, I posted a similar question in the Wayfinder forum too, not sure where it would be most appropriate...
      • 7231
      • 4,205 Posts
      Here is what I would do off the top of my head: You could use a snippet to see if there is a recent document by returning a query and check if returns a document within the time frame or not. Then, if true use one style in the menu else use the standard style in the menu. So the snippet would return only the style to use in the menu. You would use wayfinder to build the menu and the snippet to set the style.

      This is just off the top of my head, hope it gives you some ideas grin

      You could also use ditto in a wrapper snippet to do the logic, but that would be ’heavier’ on the system so a query is more recommended.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]