Skip to content

Instantly share code, notes, and snippets.

@rbaty-barr
rbaty-barr / renderHideShow
Last active August 29, 2015 14:04
render hide shows
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ArchetypeFieldsetModel>
@using Archetype.Models;
@using System.Text;
@using System.Text.RegularExpressions;
<div class="panel-group" id="accordion">
@foreach(var item in Model.GetValue<ArchetypeModel>("hideShowItem")){
var str = "collapse" + @item.GetValue("hideShowTitle").Replace(" ", "");
@rbaty-barr
rbaty-barr / indexArchetype
Created August 7, 2014 14:04
index archetype content
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using Examine;
using Umbraco.Core;
using System.Collections.Generic;
@rbaty-barr
rbaty-barr / segalHelpers.cs
Last active August 29, 2015 14:06
SegalHelpers
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using Umbraco.Core.Models;
using Umbraco.Core;
using Umbraco.Web.Models;
@rbaty-barr
rbaty-barr / hideShowItems.cshtml
Last active August 29, 2015 14:06
highligterView
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ArchetypeFieldsetModel>
@using Archetype.Models;
@using System;
@using System.Text;
@using System.Text.RegularExpressions;
@using Umbraco;
@using trainingNetWWW.App_Code;
@rbaty-barr
rbaty-barr / popover.cshtml
Last active August 29, 2015 14:06
popover view
@inherits Umbraco.Web.Mvc.UmbracoViewPage<GlossaryTerm>
@using trainingNetWWW.App_Code;
<a href="#" class="highlight" data-toggle="popover" title="@Model.Text" data-content="@Model.PopoverText">@Model.Text <i class='fa fa-question-circle'></i></a>
@rbaty-barr
rbaty-barr / ExamineIndex.config
Last active February 15, 2017 12:18
this ezSearch takes into account a multi searcher... just a starting point
<?xml version="1.0"?>
<!--
Umbraco examine is an extensible indexer and search engine.
This configuration file can be extended to create your own index sets.
Index/Search providers can be defined in the UmbracoSettings.config
More information and documentation can be found on CodePlex: http://umbracoexamine.codeplex.com
-->
<ExamineLuceneIndexSets>
<IndexSet SetName="PDFIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/PDFs" />
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
// this can be used right on a template
// example woudl be to redirect FAQ Items up to the parent category
// this example has a built in achor to expand a hide show item on the parent
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
}
@{
@rbaty-barr
rbaty-barr / custom.css
Last active April 12, 2017 16:52
base css file with media queries and some base platform idents in place
/* custom styles here */
.android {
display: none;
}
.windows {
display: none;
}
.ios {
using System;
using System.Net;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.Mvc;
using segalCollateral.Models;
using Umbraco.Web.Mvc;