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.
-
- 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);
}
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?