We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17329
    • 53 Posts
    Dear all,

    http://www.ardecherando.fr/ is just about to be launched.

    It is using ditto on every page both for displaying random content and lists.
    I had to make a custom modification to ditto to display a list of events from the current date (the next 5 events from today) as you can see on the home page for instance.
    Another cool trick if the use of a simple param to choose between non detailed view and detailed view of the same page as you can see on http://www.ardecherando.fr/calendrier/2007 (small eye at the top of the page).

    Any feedback will be greatly appreciated.
    Thanks

    Lionel
      • 10470
      • 48 Posts
      nice site grin

      would you mind explaining a bit more how you did that view switcher?
        • 17329
        • 53 Posts
        In fact you can see it as a cheap replacement of some DHTML.
        The content of the page is displayed via a ditto call where the given template depends on whether you want a concise or detailled view. So the name of  the template is simply built using a query string parameter read through a TV.

            [!Ditto? ... &tpl=`eventList[*chunkDetailParam*]Chunk`!]

        chunkDetailParam is the name of the variable that evaluate the param. The value of the variable is as follow :

        @EVAL if (isset($_GET[’chunk’])) { return $_GET[’chunk’];} else { return ’’; }

        lionel
          • 11975
          • 2,542 Posts
          Hi,


          Nicely done smiley

          you should do post it in french forum.

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 10470
            • 48 Posts
            thanks grin