Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anthony Candaele 1197 posts 2049 karma points
    Jan 18, 2013 @ 15:02
    Anthony Candaele
    0

    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

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 18, 2013 @ 19:20
    Jan Skovgaard
    1

    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

  • Mike Chambers 636 posts 1253 karma points c-trib
    Jan 18, 2013 @ 22:57
    Mike Chambers
    1

    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

     

  • Anthony Candaele 1197 posts 2049 karma points
    Jan 19, 2013 @ 07:47
    Anthony Candaele
    0

    @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

  • Asif Malik 203 posts 339 karma points
    Jan 22, 2013 @ 17:14
    Asif Malik
    0

    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.

     

Please Sign in or register to post replies

Write your reply to:

Draft