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
    I’d extend the snippet and instead have it set two placeholders... with some fancy naming conventions and a second location for the body part, you could set a background image on the upper-right of the content section as well. Make sense? (Someone with better coding skills than I will need to extend it to setting the multiple placeholder bits. You could also exclude images in the array that include "-bottom" in them on this line, maybe by changing the code:
    		if ( $file != '.' && $file != '..' && $is_image && strpos($file, '.') !== 0 )


    The goal would be to exclude the rand1-bottom.jpg/png from the mix where rand1.jpg/png would be the top half. Then just move the snippet to the top and have it set a placeholder that is the image name with the file extension stripped off. The placeholder in your CSS for the top image would be:
    url([+random+].png)

    And for the main content part:
    url([+random+]-bottom.png)


      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 7084
      • 17 Posts
      I understand what your saying.
      It makes sense, would anyone know on what I need to code to get this accomplished?

      I would prefer to have an image in one slice instead of having it cut in half, just because it is easier to maintain and less work on the designs part. I’m sure there is a way to get the second images to overlap the background somehow.

      Thanks for your help!
        • 25663 MODX Staff
        • 12,272 Posts
        Quote from: denrou at Apr 23, 2007, 10:23 AM

        I understand what your saying.
        It makes sense, would anyone know on what I need to code to get this accomplished?

        I would prefer to have an image in one slice instead of having it cut in half, just because it is easier to maintain and less work on the designs part. I’m sure there is a way to get the second images to overlap the background somehow.

        Thanks for your help!
        .PNGs with alpha transparency and IE don’t mix too well usually, but you could theoretically accomplish it with a 32-bit transparent png file and positioning/no-repeat on the bg image. Just have a negative offset on the top for the part in the white area.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me