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>
// 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;
}
@{
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;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace segalCollateral.Models
{
public class Pdfmodel
{
string T1 { get; set; }
@rbaty-barr
rbaty-barr / simpleSend.cshtml
Last active January 30, 2017 17:43
starting point for custom form sending
@using System.Net.Mail;
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
string comments = Request["comments"];
string pageID = Request["theID"];
if(Request.Headers["X-Requested-With"] == "XMLHttpRequest"){
var pageNode = Umbraco.TypedContent(pageID.ToString());
MailMessage message = new MailMessage();
string fromEmail = "";
@rbaty-barr
rbaty-barr / homepage.cshtml
Created February 10, 2017 17:19
basic start point for HTML template
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.HomePage>
@using ContentModels = Umbraco.Web.PublishedContentModels;
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en" itemscope itemtype="http://schema.org/Article">
<head>
<meta charset="utf-8">