We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4273
    • 356 Posts
    I’ve noticed for chunks that the title is case sensitive is there a reason for this ?

    ie when trying out the blog tutorial with template, WebLoginTpl.chunk has to be spelled WebLoginTpl in order to work, if it’s spelled all lowercase it won’t work weblogintpl

    seems like it would be better to keep it all lowercase no ?
      SMF Bookmark Mod - check it out
      http://mods.simplemachines.org/index.php?mod=350
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: bugsmi0 at Mar 22, 2006, 10:57 AM

      I’ve noticed for chunks that the title is case sensitive is there a reason for this ?

      ie when trying out the blog tutorial with template, WebLoginTpl.chunk has to be spelled WebLoginTpl in order to work, if it’s spelled all lowercase it won’t work weblogintpl

      seems like it would be better to keep it all lowercase no ?

      These are case-sensitive and I think it would be preferrable to stay that way; it maintains user-flexibility in naming approaches and could potentially prevent unwanted conflicts in similar names from different authors.
        • 4273
        • 356 Posts
        so this would also apply to inserting code in the html ? lowercase is standard I would have thought, I suppose what you said make sense but if the standard is lowercase in html then we wouldn’t need to worry about user-flexibility everyone would know to use lowercase. Plus since most people are a custom to using lowercase seems only natural to apply it as a standard in modx.
        User-flexibility is nice but it will confuse people, it did me, not to mention how annoying it is to have to make sure the title is exactly spelled according to the way the author spelled it. it’s so degrading he he
          SMF Bookmark Mod - check it out
          http://mods.simplemachines.org/index.php?mod=350
          • 25663 MODX Staff
          • 12,272 Posts
          LOL

          Definitely not going all-lowercase. smiley
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 32241
            • 1,495 Posts
            If we make it all lower case, then it will force users that are wanting case sensitive naming to use lowercase. So to satisfied all parties, it’s better to have case-sensitive naming, so for user like you that prefer lowercase naming, than you can enforce that in every chunks naming. With this, we can serve all parties with no problem.
              Wendy Novianto
              [font=Verdana]PT DJAMOER Technology Media
              [font=Verdana]Xituz Media
              • 4273
              • 356 Posts
              I always thought standards left no room for user preference, that’s why they are called standards grin why taylor to someone who wants to do a title like "MoDxCmS_ChunKEY lol seems this would be one user-prefence you would not want to have but I’ll tolerate it. One day, i’ll make a massive title snippet/chunky with godawful mix of lowercase/caps to let out my frustration he he
                SMF Bookmark Mod - check it out
                http://mods.simplemachines.org/index.php?mod=350
                • 32241
                • 1,495 Posts
                Quote from: bugsmi0 at Mar 22, 2006, 07:18 PM

                I always thought standards left no room for user preference, that’s why they are called standards grin why taylor to someone who wants to do a title like "MoDxCmS_ChunKEY lol seems this would be one user-prefence you would not want to have but I’ll tolerate it. One day, i’ll make a massive title snippet/chunky with godawful mix of lowercase/caps to let out my frustration he he

                Ehmmm.. the point is, nobody ever said lowercase naming is a standard convention wink FYI, it’s only for html tag. If you know programming, than you will know that lowercase is not being suggested at all for naming variables. I hope you can research further of what’s standard and what is non-standard, before stating that lowercase is a standard wink

                Another supporting point of view, you need to see MODx as a CMS/CMF for second tier users. When we talk about second tier users, it’s targeted to advanced users. When we talk about advanced user, we talk about script kiddie (ordinary coder) and advanced web designer. When we talk about this users, we talk about designing and programming. (X)HTML is not the only thing that we talk in here. We talk more than just a simple CSS styling for decent website. We talk beyond the standard users that only knows about a little bit of html scripting. BUT, we are not limiting our self to this second tier users only. We’ve been trying to make this CMS/CMF as simple as possible for ordinary users, while it still gives a lot of power and flexibility for advanced users to do more with it. So when you say about standard, it has to be the standard for both the advanced users and the ordinary users.

                My point is, there are still a lot of things that need to be improved from MODx, but naming convention is not one of them. smiley

                10 Reasons why we should not use lowercase letter only for naming convention:

                • If we have 10 digits number and 27 alphabet of lower case, than the possibility of naming is limited by the multiplication of 37 (I know multiplication is not the right naming for this, screw the math tongue). Now if we allow an additional of 27 alphabet of upper case, we will have 64, which is almost doubled the previous possibility. So with that, it serve the goal that we have, which allow greater flexibility for MODx.
                • If we name a chunk like this "chunkForTopTemplate", compare to "chunkfortoptemplate", it’s a lot easier to read the first one.
                • If we want to use "chunk_for_top_template", compare to "chunkForTopTemplate", the second one save a lot more space by eliminating 3 unecessary characters on the name.
                • If we limit the naming to lowercase, we can’t have combination uppercase and lowercase; if we have them in both lowercase and uppercase, we can enforce rules to administrator to name all the resources to all lowercase or whatever you think appropriate as the standard for your own believe.
                • Naming chunk/resources with capital letter on every word is easy to be used by most people, which I don’t think it will troubles most people, considering most programmers work using this kind of naming convention. Yes I know programmers are smart, but you don’t want to be called idiot do you, if we can remember most of variables that needs uppercase and which not.
                • There are still a lot of things do to improve MODx core, instead of wrestling around dealing with this small unecessary features (from my opinion)
                • Nobody ever say that MODx resources naming has to be all in lower case, after all resources is part of MODx, and it’s up to the core developers to defined the standard for naming convention, unless if W3C decided to choose MODx as the standard CMS through out the net, and they decided to set standard naming convention for MODx resources to use lowercase, then I’ll be the one who will take responsible in recoding the core code to follow this standard.
                • After all I like mix cases in naming something, rather than just lowercases. grin
                • Lowercase naming convention ss not important, because Ryan said so wink
                • More to be added later... Just wait for the next version of another 10 reasons why I wrote this lists.

                Anyway, that’s just because I’m bored so I came up with those 10 lists. lol grin

                EDIT: After all, I’m just kidding around with you. No offense grin
                  Wendy Novianto
                  [font=Verdana]PT DJAMOER Technology Media
                  [font=Verdana]Xituz Media
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  You’ll have to pry my camelCaps from myColdDeadHands!!! grin
                    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