We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • In my native language, using automatic_alias to generate aliasPath from pagetitle automatically seems to be harder to SEO, or sometimes jQuery.load() failed because IE6-7.0 didnt support unicode url. I have a function to process the alias and I want to ask where should I put them, do I have to make changes to the core (eg: fix getAliasPath())?

    Thanks.
    • This is the function to process the title, new forums of modx has problem with bbcode tag, so I have to use the external tool:
      http://pastebin.com/y1YutXTw

      I've seen many options for alias and friendly url in system setting, but is there an option for hooking a snippet to process the alias before adding it to database? [ed. note: nepheus last edited this post 12 years, 8 months ago.]
        • 3749
        • 24,544 Posts
        You'd do it in a plugin attached to OnBeforeDocFormSave.

        Something like this:

        <?php
        /* SetAlias plugin */
        
        /* only act if creating a new resource */
        if ($mode === modSystemEvent::MODE_NEW)  {
            $pagetitle = $resource->get('pagetitle');
        
            $alias = 'xx' // your code here
        
            $resource->set('alias', $alias);
        }
        

          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • I click on New Plugin on Elements tab and nothing show on.
          I've noticed the error:
          manager/assets/modext/build/widgets/element/modx.grid.plugin.event-min.js, 404 error.
          (and modx.panel.plugin-min.js also not found, or any file name but a "plugin" in it)
          But when I go to the url and browse it, it's still there, and I can access other files, except this one. I dont know what happen here, sounds strange... [ed. note: nepheus last edited this post 12 years, 8 months ago.]
          • I have to use my external source for those Js files, I dont know what happened with my hosting service, but now I can add new plugin.

            Sorry Bob, do I have to turn off automatic_alias to use that plugin?
            • Okay, I've got it done, download translit package and add necessary content to noaccents table.
              http://modx.com/extras/package/translit