Skip to content

Instantly share code, notes, and snippets.

View origamirobot's full-sized avatar

Chris Lees origamirobot

View GitHub Profile
<?php
//OptionTree Stuff
$eventCat = ot_get_option('event_cat');
?>
<!--FILTER-->
<div id="filter" class="blackBar">
<ul>
<li><a class="active" href="#"><?php echo get_cat_name($eventCat); ?></a></li>
<?php
// 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)
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
namespace Heinz.Opal.Custom.OreIda.Controls
{
protected override void OnPreRenderComplete(EventArgs e)
{
// LOOK FOR A SESSION VARIABLE CALLED "trail"
if (Session["BreadcrumbTrailThatWillClickNavigation"] != null)
{
// SESSION CONTAINS THE VARIABLE. EXPAND MENU TO SHOW THAT TRAIL
String script = "hj$(document).ready(function () { oreida.SiteNav.load('" + Session["BreadcrumbTrailThatWillClickNavigation"] + "'); });";
//ScriptPlaceholderBottom.Controls.Add(src);
HtmlGenericControl htmlScript = new HtmlGenericControl("script");