Skip to main content

Posts

Showing posts from December, 2011

Validation: How to Validate a Google +1 Button - Plus 1 Button - in XHTM 1.0 Strict and how to align a google +1 buttin

The Google Plus 1 button does not Validate in XHTML Strict 1.0.  It also does not align properly.

Here is the solution:  (Step 1 and 2 deal with the Validation, step 3 deals with aligning the button)

1. Paste the following Code just before your opening <body> tag:

</script>
  <!-- Plus one Google -->
  <link rel="canonical" href="http://www.braveheartweddings.co.uk/" />
<script type="text/javascript" src="https://apis.google.com/js/plusone.js%22%3E%3C/script>

2. Paste the following where you want your button to go:

<div id="plusone"> <div class="g-plusone"></div> </div>
3. In you CSS, paste in the following (this will center align the button):

#plusone{text-align:center; margin:auto; margin-top:20px};

Umbraco: Display an Image, if one has been selected, using the Media Picker in an XSLT Macro

Umbraco: Display an Image, if one has been selected, using the Media Picker in an XSLT Macro

The follwoing XSLT file shows how to display an image from the Media Picker in Umbraco. 
The important bit is highlighted.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
 version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:msxml="urn:schemas-microsoft-com:xslt"
 xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
 exclude-result-prefixes="msxml …