Are you addicted?


Livewriter support/channel configuration

Rating: 3.3 / 5 stars - 3 vote(s).



Here's some extra info on a small issue I've come across when adding Livewriter support for my articles section.

I've found that when having multiple document types holding properties with the exact same alias could get you into trouble. It is due to some code in /umbraco/users/EditUsers.aspx.cs file.

Here's the code fragment that is causing the trouble.

   1:              foreach (PropertyType pt in PropertyType.GetAll())
   2:              {
   3:                  if (!fields.Contains(pt.Alias))
   4:                  {
   5:                      cDescription.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias));
   6:                      cCategories.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias));
   7:                      cExcerpt.Items.Add(new ListItem(string.Format("{0} ({1})", pt.Name, pt.Alias), pt.Alias));
   8:                      fields.Add(pt.Alias);
   9:                  }
  10:              }

which can be found in setupChannel() function. 'cDescrption' dropdown leaves out properties that have aliases that have already been added to the list.

I think I will play a bit with the code to see if I can get it working, and I'll be submitting a patch if required.

Oh, and btw, I was looking at the source for v4.

 

Next article will be about adding a new macro type property. I've always wanted to create a 'templatePicker' (similar to the contentPicker and others...) to make it easier to select a template for a macro instead of using a text string to represent a template. It is really no big deal, but rather a step-by-step to show other people how easy it is to extend umbraco's functionality.