We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Thanks Ryan : very educating !

    I guess we can start playing indeed grin Let’s rock !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 32241
      • 1,495 Posts
      Mann...

      This is another cool thing that knowck me right on the head. Why we never use this features before? We can start having an official place for some kind of OSWD.org website. I mean we can start allowing people uploading template to be released as open source and under MODx framework.

      I know I know that we have a really easy templating system, but I think it’s not too bad to have several templates being released under MODx to gain more interest from outsider.

      EDIT:
      I guess I’m a little bit tired today, when I think about it again, we still need to have a snippet to change the template association with certain pages to be chanegd on the fly, it’s not only the css part. So ignore about my post. embarrassed
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 7455
        • 2,204 Posts
        so would it be posible to have a random image snippet set a background image in a css file?

        how do you call the css in the template? just instead of
                <link rel="stylesheet" type="text/css" href="http://modxcms.com/forums/Themes/modx/style.css" />


        you could use:
                <link rel="stylesheet" type="text/css" href="[~12~]" />
        12 being a css document with the css doctype?

        and in that document have a line like this?:
        #Background{
        background-image:url("[[RandomImage]]");
        position:relative;
        width:1000px;
        height:565px;
        }
        


        if this is the case then a whole new world of options lay ahead e.g. using a snippet to see if its ie or ff and use differend stylesheets or change parts of the stylesheets using tv’s etc how cool is that..

          follow me on twitter: @dimmy01
          • 6726
          • 7,075 Posts
          I very much agree about what you say Dimmy ! I am dreaming of everything we can do with that... those articles Ryan pointed to are exciting reading grin

          But new possibilities bring new challenges : now we’ll need dedicated snippets such as a random image snippet that could work in the context of a CSS...
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
          • It is also easy enough to just put the style for the banner image in the head of the template:

            <style type="text/css">
            #topright{background: url(assets/images/top/[!RandomImage!]) no-repeat top right;}
            </style> 


              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
              • 7455
              • 2,204 Posts
              Quote from: sottwell at Jan 17, 2006, 06:37 AM

              It is also easy enough to just put the style for the banner image in the head of the template:

              <style type="text/css">
              #topright{background: url(assets/images/top/[!RandomImage!]) no-repeat top right;}
              </style> 




              Thats what I use now and sure it work great but its in the template would we all not like to have a lean template?

              still wil bring lots of nice opertunities to use.

              Dimmy
                follow me on twitter: @dimmy01
              • Certainly; I didn’t mean to disparage the value of having the css file as a document!

                Now, if somebody can integrate a syntax-coloring editor and have the option of selecting what editor to use on documents as well as snippets and chunks...
                  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
                  • 32241
                  • 1,495 Posts
                  Hey, we might wanna start put tips/best practices section for MODx in this forum maybe. Moderator can start collecting all the good topic forum related to this, and just copy and paste the address to that with a little description of the topic trying to do. SO we have a well-centered database for known best way to achieve something with MODx.

                  Same thing with snippet, plugin, and modules for MODx as well. It’s kinda more like a preparation before we have our own repository for this kind of things.

                  Sincerely,
                    Wendy Novianto
                    [font=Verdana]PT DJAMOER Technology Media
                    [font=Verdana]Xituz Media
                    • 6726
                    • 7,075 Posts
                    Quote from: sottwell at Jan 17, 2006, 08:21 AM
                    Now, if somebody can integrate a syntax-coloring editor and have the option of selecting what editor to use on documents as well as snippets and chunks...

                    + 1

                    That would be GREAT !

                    Quote from: wendy at Jan 18, 2006, 02:44 PM
                    Hey, we might wanna start put tips/best practices section for MODx in this forum maybe. (...)Same thing with snippet, plugin, and modules for MODx as well. It’s kinda more like a preparation before we have our own repository for this kind of things.Sincerely,

                    Great idea, I was thinking along those line too.

                    Since MODx’s documentation is already task-oriented, maybe this could be integrated as examples in the doc. But we could collect to examples in the forums as you suggest
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l&#39;outil id
                    • One other issue on this subject, with friendly URLs the document comes out as xxx.html, not xxx.css. The browsers don’t seem to care, since I call it like this in the template head

                       @import url([~77~]);


                      and it turns out like this in the actual page source

                       @import url(77.html);


                      and it appears to be working OK anyway...just seems odd.
                        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