XSLT Node not rendering when I add the following Context Menu???
Not sure what but something in my code is causing my XSLT Node in teh Dev section to not render it's childnodes. If I remove the solution for the /bin it XSLT node renders fine.
namespace corMailContextMenu { public class corMailContextMenuItem:ApplicationBase { Node node1;
public corMailContextMenuItem() { umbraco.cms.presentation.Trees.BaseTree.BeforeNodeRender += new umbraco.cms.presentation.Trees.BaseTree.BeforeNodeRenderEventHandler(BaseTree_BeforeNodeRender); }
public class MailActionItem : umbraco.interfaces.IAction { #region IAction Members private string _alias = "Mail it Out"; public string Alias { get { return _alias; } }
public bool CanBePermissionAssigned { get { return true; } }
public string Icon { get { return "http://me.kevon.me/media/mail.png"; } }
public string JsFunctionName { get { //return "CallAlert();"; return "GetMailForm();"; } }
public string JsSource { get { //return "function CallAlert(){ alert('Hey'); }";
I have no experience what so ever with the Context Menu, but my first inital thought would be perhaps your node1 load is throwing an error. I would split your if criteria into 2 seperate statements and move your node1 load inside the first as a quick test.
if(node.NodeType=="content") { try {
node1 = new Node(Convert.ToInt16(node.NodeID)); if (node1.NodeTypeAlias == "corNewsletter")
{ node.Menu.Insert(14,newMailActionItem());
} } catch(ExceptionExActionItemAdd) { umbraco.BusinessLogic.Log.Add(LogTypes.Error,Convert.ToInt16(node.NodeID),ExActionItemAdd.StackTrace.ToString()); }
XSLT Node not rendering when I add the following Context Menu???
Not sure what but something in my code is causing my XSLT Node in teh Dev section to not render it's childnodes. If I remove the solution for the /bin it XSLT node renders fine.
For sake of testing, have you tried the AfterNodeRender event instead of BeforeNodeRender?
Cheers,
/Dirk
Dirk that didnt work either. Log just shows Treeservice error... this has been common since i installed Umbraco.
<freezingInTheColdForMonths>
faint cry for help as he takes his last breaths...
</freezingInTheColdForMonths>
I have no experience what so ever with the Context Menu, but my first inital thought would be perhaps your node1 load is throwing an error. I would split your if criteria into 2 seperate statements and move your node1 load inside the first as a quick test.
is working on a reply...