A
<script></script>
B
IEnumerable<Node> nodes = uQuery.GetNodesByXPath("$ancestorOrSelf/*[normalize-space(pub)][1]"); | |
if (nodes != null) | |
{ | |
ltlFancyAPint.Text = nodes.First().GetProperty("pub").ToString(); | |
} |
@using umbraco.MacroEngines | |
@inherits umbraco.MacroEngines.DynamicNodeContext | |
@if (@Parameter.Url !=null) | |
{ | |
string url = @Parameter.Url; | |
string query = Request.ServerVariables["QUERY_STRING"]; | |
Response.Status = "301 Moved Permanently"; | |
Response.Redirect(url + query); |
/// Lets give it a go. | |
/// Why could this fail? API offline, API outputing invalid XML, XSLT file missing/invalid. | |
try | |
{ | |
/// <summary> | |
/// Passes the parameters into a XSL file, that is run against in memory XML | |
/// </summary> | |
string xsltFilePath = Server.MapPath("~/XSLT/getProduct.xsl"); |
<?xml version="1.0" encoding="utf-8"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- | |
This task will minify CSS and JS files. | |
By default it was process 'all' files inside the specified directories | |
Depends on the YUI Compressor DLL, located in the Tools folder (http://yuicompressor.codeplex.com/documentation) | |
VISUAL STUDIO : update your projects .ProjectName.Targets file to Import the project | |
using Yahoo.Yui.Compressor; | |
public static string MinifyCss(string body) | |
{ | |
var cssCompresser = new CssCompressor(); | |
var minifiedCss = cssCompresser.Compress(body); | |
return minifiedCss; | |
} |
/Build/Readme | |
============== | |
This project aims to make building, publishing and deploying Umbraco web applications easier. | |
It also enables team members who do not have Visual Studio to create and edit content without Visual Studio. | |
It encourages a seperation between the Visual Studio .csproj file and a user generated .targets which in my view makes MSBuild easier to grasp. | |
It automates the following: | |
- Including the Umbraco Application | |
- Including files created within Umbraco (e.g. a new stylesheet) | |
- Ensures required files are avalible for the build (e.g. installedPackages.config) |
<!-- Process <content /> --> | |
<xsl:template match="content"> | |
<!-- Process the $currentPage and load it's RTE, etc --> | |
<xsl:apply-templates select="$currentPage[current()/@position = 1]" mode="content"> | |
<xsl:with-param name="position" select="@position" /> | |
</xsl:apply-templates> | |
<!-- When the template has more than 1 content block, look inside the /Callouts folder--> | |
<xsl:if test="@position > 1"> | |
<!-- Handle sub content blocks, these could be RTE's, Link Groups, Widgets, Video's --> | |
<xsl:apply-templates select="$currentPage/Callouts/* [@isDoc][position() = current()/@position - 1]" mode="content"> |
Version Control does what it says on the tin. It allows you to travel back in time. As with most computer software it comes in different flavours (SVN, Hg, Git, etc) but the core concepts remain the same. A person creates or edits a file and these changes are 'commited' against time. Everytime a commit happens, a marker is created - a snapshot. This contains some meta data/information:
[timeline diagram]