This code seems very repetitive.  Can you add all the common items, and then optionally add each conditional item?  Rather than creating the whole menu for each condition?