We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20004
    • 4 Posts
    Intro
    - Another note for newbies (like myself)
    - Tags: Friendly URLs, .html suffix prefix settings, Content Types

    Quick Problem:
    - I’ve setup Friendly URLs correctly (I think) but I’m confused about suffixes. When I navigate to www.example.com/mybrilliantalias I either get an error or it defaults (I think) to index.php
    - However, when I try www.example.com/mybrilliantalias.html it works.

    Quick Solution:
    1. Go to System >>> Content Types, click "New Content Type" and complete the form (pretty straightfoward).
    2. Remember to type "/" (i.e. a forward-slash) in the File Extension field, NOT AN EMPTY STRING (it doesn’t let you anyway)
    3. Go to your Resource and select your new custom Content Type.
    4. Done!

    Lessons Learned:
    - I read that MODx Revolution 2.0.4 no longer requires/uses prefix and suffix settings in the manager console. Instead, it uses Content Types.
    - Hence, for each Resource you create, you can now specify it’s Content Type (e.g. HTML, JS, CSS, etc) and the suffix is derived from this, including your own custom Content Types as explained above.


    Regards.
      • 26016
      • 561 Posts
      Cool.

      You can also just edit the HTML Content Type, and remove the curious default suffix, "html", which as someone said yesterday, is somewhat archaic by now.

      HOWEVER, be careful when doing that - because of the very funky interface, I actually deleted (instead of editing) the HTML Content Type, and there’s no quicker way to break your entire site. Worst of all, you can’t just re-create it, because then it doesn’t have the database identifier that’s hard-coded into other parts of the system. If that doesn’t mean anything to you, suffice it to say that you’re screwed, and you’ll have to have a geek run an SQL query to re-create the original HTML Content Type.

      The breakage can be avoided by just double-clicking on the part that says "html", and only editing that. Not obvious, because there’s no prompt, you just have to know that or guess it.
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 20004
        • 4 Posts
        @samba

        In response, I would also add two further cents (subject to my limited newbie understanding):

        1. For: since Rev 2.0 does not allow you to change the default Content Type when one creates a new Resource (i.e. it defaults to ’HTML’) you solution bridges the gap.
        2. Against: making the proposed change - rather than creating a new Content Type - might be ill advised should the user not be expecting all of their Resources (whose current Content Type is ’HTML’, or rather the ID which it represents) to also suddenly lose their .html suffix. (Not to mention the potential deletion problem you’ve illustrated.)
        2.1 Having said that, if that IS EXACTLY what they want to do then that’s a darn sight quicker than creating a new Content Type and manually changing every single Resource (where desired).

        Regards.
          • 26016
          • 561 Posts
          Good thoughts. And I’m very impressed that as a newbie, you’re already thinking about things a whole lot, and even proposing solutions - I think you’ll become a particularly valued community member!

          Revo is tricky, and I say that as a MODx veteran. IMO, its interface has become better for programmers, but somewhat less friendly to newbies and clients. And the programmers and ubergeeks just find that opinion to be utterly astounding. smiley But its good new features have convinced me to really tear into it.

          Cheers, Dave
            MODx and Wordpress development
            Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
            • 22303 MODX Staff
            • 10,725 Posts
            @modxfatherforum: Thank you indeed for your active participation in the community as a newbie. Your feedback is invaluable to the MODx community.

            Quote from: samba at Dec 03, 2010, 03:50 PM

            Revo is tricky, and I say that as a MODx veteran. IMO, its interface has become better for programmers, but somewhat less friendly to newbies and clients. And the programmers and ubergeeks just find that opinion to be utterly astounding. smiley But its good new features have convinced me to really tear into it.
            FWIW, I don’t find that opinion astounding at all. We as a team are aware that the manager interface that is currently shipped with MODx Revolution is geared more toward power users. But it does not define the entire product, nor should it. The vision has been that a wide-variety of solutions for MODx administration—solutions that can target specific user types or use cases—will be built on top of this framework. Think Section 508/WAI UI, mobile browser UI, Markdown extensions, or just simplified themes of the new manager. Maybe even an Evo look-alike UI. Since you can create a tailored administration UI, using MODx Resources and Elements or by extending the modRequest and modResponse classes and doing it the way you want, and can then distribute those via package management as a custom admin Context, the potential is definitely there.

            We’re just early in the lifecycle of Revolution; until some more robust solutions are exemplified on top of the framework we will be heavily focused on designer/developer experience, so those solutions can be realized. I think we’ve created a good foundation here, we just have to focus on getting it right for the so-called übergeeks first, so they adopt it early and help create those end-user targeted, killer Extras that will help grow the entire MODx ecosystem.

            That said, we really do appreciate you seeing the potential and tearing into it.