What do you specifically think about when you say "bad names"...?
Is it that they contain special characters like ":', etc?
I suppose you could perhaps hook into a BeforeSave event and make sure that unwanted characters gets removed...however this solution is not very elegant if you're using the nodename in the title on the page or if you're using the standard values package to populate a field to contain the title of the created node...
So actually I'm not sure what would be the best way to avoid it int he backoffice - but in the generated url all of the above characters should already be rewritten to something nicer out of the box according to the rules defined in the umbracoSettings.config file.
you could also inject some jquery into the create page dialog.. to limit the text that can be inserted... a little hacky and also able to be overridden in the properties page once the page is created without a similar injection
@Jan, yes, by 'bad names' I mean special characters. The problem is not so much the generated url's, but my system administrator complained about files with special characters not being backupped in the nightly backup.
I'm not using the filename as a Page Title, so I guess maybe the best solution would be to just inform the editors not to use special characters in their file names. I'm always using the 'metaTitle' property as a Page Title. I do this, because I have read that it's good for SEO when the meta title tag in the header tag is the same as the h1 title on the page.
@Mike, like I said to Jan, maybe it's best to just inform the editors about some best practices when naming their documents in the content tree. But you touched also upon another problem. This is the problem where editors rename the name of the document under the Properties tab. This is problematic for SEO, as it generates a 404 error. I know, there are some great 301 redirect packages, like the excellent 301 URL Tracker by kpusoep, but I rather not have editors changing document names. So I wonder if there's a way to prevent editors from changing the document name under the Properties tab.
Hi Anthony, not sure if i am missing something but if you edit the umbracoSettings.config file in the config folder, you can add in additional url character replacements.
prevent editors from creating unfriendly document names
Hi,
I develop Umbraco websites for the Ghent University (Belgium).
I recurring problem I have is that editors give their Umbraco documents web unfriendly names:
Is there a way to prevent editors of giving bad names to their Umbraco documents in the Content Tree ?
Thanks for your advice,
Anthony
Hi Anthony
What do you specifically think about when you say "bad names"...?
Is it that they contain special characters like ":', etc?
I suppose you could perhaps hook into a BeforeSave event and make sure that unwanted characters gets removed...however this solution is not very elegant if you're using the nodename in the title on the page or if you're using the standard values package to populate a field to contain the title of the created node...
So actually I'm not sure what would be the best way to avoid it int he backoffice - but in the generated url all of the above characters should already be rewritten to something nicer out of the box according to the rules defined in the umbracoSettings.config file.
/Jan
you could also inject some jquery into the create page dialog.. to limit the text that can be inserted... a little hacky and also able to be overridden in the properties page once the page is created without a similar injection
/umbraco/dialogs/create.aspx
and
/umbraco/editContent.aspx
@Jan, yes, by 'bad names' I mean special characters. The problem is not so much the generated url's, but my system administrator complained about files with special characters not being backupped in the nightly backup.
I'm not using the filename as a Page Title, so I guess maybe the best solution would be to just inform the editors not to use special characters in their file names. I'm always using the 'metaTitle' property as a Page Title. I do this, because I have read that it's good for SEO when the meta title tag in the header tag is the same as the h1 title on the page.
@Mike, like I said to Jan, maybe it's best to just inform the editors about some best practices when naming their documents in the content tree. But you touched also upon another problem. This is the problem where editors rename the name of the document under the Properties tab. This is problematic for SEO, as it generates a 404 error. I know, there are some great 301 redirect packages, like the excellent 301 URL Tracker by kpusoep, but I rather not have editors changing document names. So I wonder if there's a way to prevent editors from changing the document name under the Properties tab.
Thanks both to Jan and Mike for your help,
Anthony
Hi Anthony, not sure if i am missing something but if you edit the umbracoSettings.config file in the config folder, you can add in additional url character replacements.
is working on a reply...