We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32017
    • 151 Posts
    just using a conditional statement to check whether its a certain day of the month..

    basically i want my chunk which is called in the template to show every friday, then disappear all other days smiley

    simple solutions please
      London web design - MODx specialists
      • 19164
      • 1,215 Posts
      PHx is the simplest solutiuon

      1. Install PHx (see in repository)

      2. Create your custom modifier- file in \assets\plugins\phx\modifiers with the name getdayofweek.phx.php and code
      <?php
      return date ("l");
      ?> 


      3. In the page use this modifier: [+phx:getdayofweek:is=`Friday`:then=`[[SnippetCall]]`+]

      Very simple smiley

      But i’m not sure how it works when page caching...
        DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

        Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

        [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
        • 3749
        • 24,544 Posts
        Or without PHX,

        1. Create a snippet called Friday with this code:

        $output = "";
        $today = date("l");
        if($today == "Friday") {
            $output = "Your Stuff Here";
        }
        
        return $output;


        2. Put the Friday snippet call on the page where you want the stuff to appear.

          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
          • 32017
          • 151 Posts
          Both work a treat smiley

          calling the snippet [!Snippet!] un cashed should help smiley

          cheers people
            London web design - MODx specialists