We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16430
    • 217 Posts
    Sorry for missunderstanding.
    I have one page called MENU, this page has few TV (mon, Tue, Wen,...) where I put the menu in the text field for each day.

    Then I want to display on different pages the menu only for current day.
      • 16430
      • 217 Posts
      So, any way to solve this?
        • 3749
        • 24,544 Posts
        Use TV tags (or tags for a different snippet) on those pages, use a snippet tag on the rest.
          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
          • 16430
          • 217 Posts
          I solve it this way:
          One page Id=24 with 15 TVs containing menu for each day (mon to Fri)

          Page where I want to display menu for today:
          [[!getResources?   &parents=`24` &resources=`24`  &tpl=`menu-rotator` &includeTVs=`1` ]]


          menu-rotator:
           <p>Soup: 
              [[+tv.menu-po0:istoday=`Mon`]]    
              [[+tv.menu-ut0:istoday=`Tue`]]    
              [[+tv.menu-st0:istoday=`Wen`]]    
              [[+tv.menu-ct0:istoday=`Thu`]]    
              [[+tv.menu-pa0:istoday=`Fri`]]          
              </p>
              <p>Menu1: 
                [[+tv.menu-po1:istoday=`Mon`]]
                [[+tv.menu-ut1:istoday=`Tue`]]      
                [[+tv.menu-st1:istoday=`Wen`]]      
                [[+tv.menu-ct1:istoday=`Thu`]]      
                [[+tv.menu-pa1:istoday=`Fri`]]            
              </p>
              <p>Menu2: 
                [[+tv.menu-po2:istoday=`Mon`]]
                [[+tv.menu-ut2:istoday=`Tue`]]      
                [[+tv.menu-st2:istoday=`Wen`]]      
                [[+tv.menu-ct2:istoday=`Thu`]]      
                [[+tv.menu-pa2:istoday=`Fri`]]  
              </p>

          Snippet istoday:
          <?php
          $datum=date("D");
          if ($datum == $options) return $input;
          else return " ";


          If anyone knows better solution I would be glad to hear it... [ed. note: kudykam last edited this post 12 years, 5 months ago.]