We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    Quote from: sottwell at Sep 08, 2005, 01:43 PM

    Anyway, the other main issue was the SearchForm snippet; it seems that you can’t have bare input fields (or anything else) in a form, they have to be enclosed in a <div> or something INSIDE the form tags.  So I just added the <div>...</div> tags inside the form tags in the snippet.  Now it’s all nice and valid.
    FYI, for "proper" XHTML semantic correctness you should technically be using fieldset tags for grouping related form fields. However, the goofy legend tag will give you fits cross browser. The new default content I’m working on for TP 3.3 will contain forms made this way.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I faked it; I added a bit of code to the snippet (later I’ll adjust it to accept an argument)

         $chunk_main .=    '<div class="EPG2_single_pic">';
      
      // hack to get a first picture showing in slideshow mode
      if(!isset($_GET['pic'])) {
          $chunk_main .= '<img class="EPG2_image_large" alt="Slideshow" src="assets/images/startimage.jpg" width="400" height="300" />';
      } else {
      
         $chunk_main .=       '<img class="EPG2_image_large" alt="'.$picture['title'].'" src="assets/modules/epg2/image.php?type=pic_large&id='.$picture['id'].'" />';
      }
      
      // end of hack
      
         $chunk_main .=    '</div>';


      I suppose I should make my "Photo Gallery" menu link be to a weblink, and pass the appropriate parameters in the query string of the weblink.

        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        (accidentally posted this in the wrong forum late last night...)

        I was quite pleased with the gallery I created of screenshots of different site designs. Then my partner wasn’t happy with just being able to see a snapshot of a webpage, he wanted to be able click on the thumbnail in the gallery in the top banner of his home page, and switch the home page to that template! So I got a simple javascript stylesheet switcher ( http://www.alistapart.com/articles/alternate/ ), paid a little attention to the names of the images in the gallery so they could be the same as the title in the css stylesheet tags, and made this mod to the link generation code of the thumbnails:

        
        // Change link to switch stylesheet
                $chunk_main .=    '<a href="#" 
        onclick="setActiveStyleSheet(\''.$picture['title'].'\'); 
        return false;"><img class="EPG2_image_thumb" alt="'.$picture['title'].'" src=assets/modules/epg2/image.php?type=pic_thumb&id='.$picture['id'].' /></a>';



        renamed the snippet to SiteGallery, and presto! A row of images of designs that you can click on to actually change the CSS file of the page to match the image.

        This is why I created the 4in1 template. It’s fully loaded for a three-column layout, and I use several duplicated block selection TVs to fill everything, and enable/disable the parts through the CSS using display:none to disable what I don’t want. It makes for a bigger than necessary HTML file since it has everything, but it makes it possible to switch layouts very easily. Fun. Especially useful for switching to a single-column large-print version.

        Next I suppose he’ll want the whole site to be switched. <sigh> more cookies. Well, maybe he won’t think of it and will be happy with what he’s got Wink
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 1764
          • 680 Posts
          Is there a reason that we haven’t posted this anywhere outside of the Project Team forums? It looks like it could work well for what ScottyDelicious is looking for (http://modxcms.com/forums/index.php/topic,1044.0.html)
            • 32963
            • 1,732 Posts
            Adma,

            You’re correct it was only here for testing. Once the new EPG2 code is added in it should be ready for release
              xWisdom
              www.xwisdomhtml.com
              The fear of the Lord is the beginning of wisdom:
              MODx Co-Founder - Create and do more with less.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I’m getting ready to install this again on a new 0.9 MODx; is there anything new with it?
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org