Created
February 4, 2013 20:07
-
-
Save origamirobot/4709277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CHECK THE TARGET PAGE FOR A NonRobotRedirector SUBLAYOUT | |
Control nonRobotRedirector = LayoutManager.GetLayout(I, typeof(NonRobotRedirector)); | |
// CHECK TO SEE IF THE TARGET FOR THE BUTTON ON THIS BLOCK IS LINKING TO A PAGE THAT CONTAINS A NonRobotRedirector | |
if (nonRobotRedirector != null) | |
{ | |
// TARGET PAGE HAS A NonRobotRedirector CONTROL ON IT. RENDER LINK AS OnClick JAVASCRIPT PUSHDOWN. | |
BreadcrumbList list = BreadcrumbManager.BuildBreadcrumbFromItem(I); | |
if (list.HasNavItem) | |
{ | |
ActionButton.NavigateUrl = "#"; | |
string id = ActionButton.ClientID; | |
String script = "hj$('#" + id + "').onClick(function(e){ hj$.preventDefault(e); oreida.SiteNav.load('" + list.Trail + "'); }); "; | |
ScriptManager.RegisterClientScriptBlock(this, typeof(BaseContentBlock), "setOnClickHandler" + this.ID, script, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment