I recently encountered an issue where my non-content blocks (site settings, categories, etc.) were producing a "For This" folder with a missing token. This missing token appeared in custom content, as well as add-ons like Geta Categories.
<?xml version="1.0" encoding="utf-8" standalone="yes"?><languages> <language name="English" id="en"> <contenttypes> <CategoryData> <name>Working Category! </name> </CategoryData> </contenttypes> </language></languages>
Simply adding the file for Geta Categories will resolve the issue there, since they've already included the required UIDescriptor in the package. The result will look like this:
<?xml version="1.0" encoding="utf-8" standalone="yes"?><languages> <language name="English" id="en"> <contenttypes> <SettingsBase> <name>Setting</name> </SettingsBase> <CategoryData> <name>Category</name> </CategoryData> </contenttypes> </language></languages>
The UIDescriptor is few lines of code that inherit from the generic UIDescriptor<T> where T is the content type we want to target. As you can see in the XML the parent node of name should be the content type name so that Optimizely can pair it up correctly.
[UIDescriptorRegistration] public class SettingsBlockFolderDescriptor : UIDescriptor<SettingsBase> { public SettingsBlockFolderDescriptor() { IsPrimaryType = true; } }
With both pieces in place, we'll now see our XML-defined name appear instead of the empty token, {0}:
Comments
Post a Comment