Posts

Showing posts from January, 2015

Umbraco Razor A to Z Loop iterate Through Media Folders:

Image
Umbraco Razor A to Z Loop iterate Through Media Folders: @using Examine @using Examine.SearchCriteria @using UmbracoExamine @using System.Xml.XPath @helper DisplayDocImage(string thisExtension) { switch (thisExtension) { case "docx": case "doc": case "rtf": { @Html.Raw("Word Document"); break; } case "xls": case "xlsx": { @Html.Raw("Excel Spreadsheet Document"); break; } case "ppt": case "pps": case "pptx": case "ppsx": { @Html.Raw("Powerpoint Document");

Umbraco Razor - Delete Pages by Category

The following script allows the User to delete a list of Event Pages by selecting a category: The Second Example is the same as the First except the Umbraco Data type is listed in a Dropdown. Demo Example 1: @inherits umbraco.MacroEngines.DynamicNodeContext @using umbraco.cms.businesslogic.web @{ @* 1. Get the Querystring that Contains the Catecory from Part 3 *@ var qdeleteCat = Request["deleteCat"]; /* Filter*/ if (Request["deleteCat"] != null) { qdeleteCat = Request["deleteCat"]; } else { qdeleteCat = ""; } @* ------------------------------------------------------------- *@ @* 2. Get the Querystring that Contains the Confrim from Part 3 *@ var qConfirm = Request["confirmDelete"]; /* Filter*/ if (Request[&q