I'm taking version 7 for a spin and I notice underscores are automatically removed from my document types' alias names when I try to name them like that!
The thing is that I use a naming scheme like this:
_Products Products SomeOtherListingSimilar
I do this so that my content users don't have to choose a template (because they always choose the wrong one). This way I have 1 document type definition and I can assign my templates like I want.
I've not seen it, but I can think of a couple of reasons why they might do it.
First thing is that when doing the examin/lucene search indexing, the convention is that the internal properties are prefixed with an underscore (_id, _path etc etc).
The other is that the alias is also used as an xml element name in the cache. I'm not sure, but it could be invalid to start an element name with an underscore.
I hope that at least clears up why it could be happening.
I was looking inthe source, and it seems there might be something wrong, everywhere I look I see that underscore is allowed as an alias character (but maybe not as the first character, but even if I try S_Products it skips the underscore).
I was looking at "public DefaultShortStringHelper WithDefaultConfig()" in Umbraco-CMS-7.0.2\src\Umbraco.Core\Strings\DefaultShortStringHelper.cs
}).WithConfig(CleanStringType.Alias, new Config
{
PreFilter = ApplyUrlReplaceCharacters,
IsTerm = (c, leading) => leading
? char.IsLetter(c) // only letters
: (char.IsLetterOrDigit(c) || c == '_'), // letter, digit or underscore
StringType = CleanStringType.Ascii | CleanStringType.UmbracoCase,
BreakTermsOnUpper = false
});
Umbraco 7 - Underscores in document type alias?
I'm taking version 7 for a spin and I notice underscores are automatically removed from my document types' alias names when I try to name them like that!
The thing is that I use a naming scheme like this:
_Products
Products
SomeOtherListingSimilar
I do this so that my content users don't have to choose a template (because they always choose the wrong one). This way I have 1 document type definition and I can assign my templates like I want.
Anyone came accross this? Thanks!
I've not seen it, but I can think of a couple of reasons why they might do it.
First thing is that when doing the examin/lucene search indexing, the convention is that the internal properties are prefixed with an underscore (_id, _path etc etc).
The other is that the alias is also used as an xml element name in the cache. I'm not sure, but it could be invalid to start an element name with an underscore.
I hope that at least clears up why it could be happening.
I was looking inthe source, and it seems there might be something wrong, everywhere I look I see that underscore is allowed as an alias character (but maybe not as the first character, but even if I try S_Products it skips the underscore).
I was looking at "public DefaultShortStringHelper WithDefaultConfig()" in Umbraco-CMS-7.0.2\src\Umbraco.Core\Strings\DefaultShortStringHelper.cs
Quite odd...
is working on a reply...