Cg11 Did You Know

171
8/22/2019 Cg11 Did You Know http://slidepdf.com/reader/full/cg11-did-you-know 1/171  Did you know?

Transcript of Cg11 Did You Know

Page 1: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 1/171

 

Did you know?

Page 2: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 2/171

DID YOU KNOW?

Using umbraco for 5 years

Certified developer

Official trainer

uPhotographer™ 

4x MVP

ImageGen

XSLTsearch

Page 3: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 3/171

DID YOU KNOW?

Is this session for you?Yes!

Unless…  you’ve attended a course with me in the last year 

you saw my presentation at the UK festival

you’re in a hurry 

• download my presentation soon atblog.percipientstudios.com stream.umbraco.com 

Note: Umbraco 4.7 will be discussed 

Page 4: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 4/171

 

Where does the name come from?

Page 5: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 5/171

DID YOU KNOW?

Page 6: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 6/171

 

How do you pronounce it?

Page 7: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 7/171

DID YOU KNOW?

um-BRAH-co

UMMM-bra-co

um-BRAKE-oh um-BROCK-oh

ooom-braco

(there is no official pronunciation)

Page 8: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 8/171

 

What is umbraco?

Page 9: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 9/171

DID YOU KNOW?

Umbraco A web developement framework 

optimized for editorial content.

You form the frameworkto fit your needs exactly 

With a user interfacecontent editors

will find easyto use

Page 10: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 10/171

DID YOU KNOW?

Umbraco Built on Microsoft .NET and 100% integrated

Any skills or knowledge you have with .NET aretotally applicable and usable

But...

You can build complete websites without writing a

single line of .net code.

Or with lots of .net code if that’s your choice

Page 11: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 11/171

 

Umbraco architectureBasic

Page 12: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 12/171

DID YOU KNOW?

Templates

Thanks go to Matt Brailsford

Page 13: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 13/171

DID YOU KNOW?

Architecture benefits Short project timelines with parallel teams

Content entry

• Your client becomes free ‘staff’ for you :) 

Design

• Start even before design is complete

Site development

• Hired guns or internal devs

Page 14: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 14/171

 

Document types

Page 15: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 15/171

DID YOU KNOW?

Document types Define the content data, types, and structure

An analogy – a movie database You can’t enter movies until you have a place to put

the information you want to save

Page 16: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 16/171

DID YOU KNOW?

Document types We can have unlimited Document Types

We can have unlimited properties on aDocument type

Think of document types as an extendable

database you can design any way you want

Page 17: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 17/171

DID YOU KNOW?

Document typesRules of thumb

Make as many docTypes as you need

If your design has a unique template you probablywant a unique docType as well

Typically, a docType has only one templateassociated with it

• It may have more than one template

• It may have NO templates (data storage only)

Page 18: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 18/171

DID YOU KNOW?

Document types De facto standard properties:

bodyText

• (primary content richtext editor)

umbracoNaviHide

• (true/false)

Page 19: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 19/171

DID YOU KNOW?

Document types Special property aliases:

umbracoRedirect

• A nodeid (contentPicker)

• Umbraco will redirect to the selected page

umbracoInternalRedirectId

• A nodeid (contentPicker)

• Umbraco will load the selected page’s content

transparently; no url change

Page 20: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 20/171

DID YOU KNOW?

Document types Special property aliases, continued:

umbracoUrlName

• A textstring

• Override the page’s default url 

umbracoUrlAlias

• A textstring

• Add additional urls for the page

• Example: “faq,support/help/answers” • No spaces, no leading slash, no “.aspx” 

Page 21: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 21/171

DID YOU KNOW?

Document types Structure control

Create a page of a specific document type

Then remove that document type from theallowed children of the parent document type

*PRESTO* that page can’t be created again 

Page 22: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 22/171

 

Create Multiple Thumbnail SizesAutomatically (even without ImageGen :)

Page 23: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 23/171

DID YOU KNOW?

Multiple thumbnail sizes

Page 24: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 24/171

DID YOU KNOW?

<xsl:variable name="image"select="$currentPage/uploadTestField" />

<xsl:variable name="filename"select="substring-before($image, '.')" />

<img src="{concat($filename, '_thumb.jpg')}" />

<img src="{concat($filename, '_thumb_250.jpg')}" />

<img src="{concat($filename, '_thumb_400.jpg')}" />

Multiple thumbnail sizes

Page 25: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 25/171

 

To Copy or „Master‟ Your DocTypes That is the question

Page 26: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 26/171

DID YOU KNOW?

A matter of preference Copy

Fast and flexible

• Copy and then delete any fields you don't need

Master

Slightly less flexible

• Can’t change master relationship later

▪ (see Doc Type Extensions project for solution)

Slightly more flexible

• Using the DocTypeMixins package

Either

Export Document Type for re-use in another site

Page 27: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 27/171

 

Templates

Page 28: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 28/171

DID YOU KNOW?

Templates You have full control over the markup

W3c

SEO

Semantic

(retro tables with shim gifs?)

…your choice! 

Page 29: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 29/171

Page 30: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 30/171

Page 31: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 31/171

Page 32: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 32/171

Page 33: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 33/171

DID YOU KNOW?

Templates The process

Paste in static markup

Replace hard-coded lorem ipsum withdynamic content

• Umbraco Items

• Umbraco Macros

bodyText 

MainNav 

Page 34: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 34/171

DID YOU KNOW?

Templates Document type property fields

<umbraco:Item field="bodyText" runat="server" />

Macro logic

<umbraco:Macro alias="MainNav" runat="server" />

bodyText 

MainNav 

Page 35: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 35/171

DID YOU KNOW?

<html>

<head><title><umbraco:Item field="pageName" runat="server"/></title>

</head>

<body>

<h1><umbraco:Item field="pageName" runat="server"/></h1>

<umbraco:Item field="bodyText" runat="server"/> 

</body></html>

Page 36: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 36/171

DID YOU KNOW?

Templates How is this done?

Umbraco templates are .NET Master Pages

bodyText 

MainNav 

Page 37: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 37/171

DID YOU KNOW?

Templates ASP.NET MasterPage Templates

<asp:ContentPlaceHolder 

ID="dingo"

runat="server" />

<asp:Content 

ContentPlaceHolderID="dingo" 

runat="server"> 

<p>some riveting content</p> </asp:Content> 

Page 38: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 38/171

DID YOU KNOW?

Our master template<html>

<head>

<title><umbraco:Item field="pageName" runat="server"/></title>

</head>

<body>

<asp:ContentPlaceHolder ID="dingo" runat="server"/>

</body>

</html> 

Page 39: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 39/171

DID YOU KNOW?

Our text page template

<asp:Content ContentPlaceHolderID="dingo" runat="server">

<h1><umbraco:Item field="pageName" runat="server"/></h1>

<umbraco:Item field="bodyText" runat="server"/>

</asp:Content>

Page 40: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 40/171

DID YOU KNOW?

When the page is rendered… <html>

<head>

<title><umbraco:Item field="pageName" runat="server"/></title>

</head>

<body>

<h1><umbraco:Item field="pageName" runat="server"/></h1>

<umbraco:Item field="bodyText" runat="server"/> 

</body>

</html> 

Page 41: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 41/171

DID YOU KNOW?

Advanced templates A template can have many placeholders

Each placeholder much have a unique ID

A placeholder can contain default content

Content contained in the content placeholder isyour default fallback content

Assign new content with asp:Content tag Clear default content with empty asp:Content tag

Page 42: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 42/171

DID YOU KNOW?

Advanced templates<html>

<head>

<asp:ContentPlaceHolder ID="header" runat="server">

<!-- default content for contentplaceholder -->

<title><umbraco:Item field="pageName" runat="server"/></title></asp:ContentPlaceHolder>

</head>

<body>

<asp:ContentPlaceHolder ID="body" runat="server">

<!-- default content for contentplaceholder --><h1><umbraco:Item field="pageName" runat="server"/></h1>

<umbraco:Item field="bodyText" runat="server"/>

</asp:ContentPlaceHolder>

</body>

</html> 

Page 43: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 43/171

DID YOU KNOW?

<asp:Content ContentPlaceHolderID="header" runat="server">

<title><umbraco:Item field="pageName" runat="server"/></title>

<script src="lightbox.js" type="text/javascript"></script></asp:Content>

<asp:Content ContentPlaceHolder ID="body" runat="server">

<h1><umbraco:Item field="pageName" runat="server"/></h1><umbraco:Macro alias="gallery" runat="server"/>

</asp:Content>

Advanced templatesGallery template

Page 44: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 44/171

DID YOU KNOW?

Advanced templates Put placeholders inside asp:Content tags

Allows child templates to inject contentinto parent or grand-parent templates

Aka, template inheritance

Page 45: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 45/171

DID YOU KNOW?

Advanced templates<head>

<asp:ContentPlaceHolder ID="header" runat="server">

<!-- default content for contentplaceholder -->

<title><umbraco:Item field="pageName" runat="server"/></title>

</asp:ContentPlaceHolder></head>

...

<asp:Content ContentPlaceHolder ID="header" runat="server">

<title>My title</title>

<asp:ContentPlaceHolder ID="headerScripts" runat="server" />

</asp:Content>

...

<asp:Content ContentPlaceHolder ID="headerScripts" runat="server">

<script language="javascript">

...

</script>

</asp:Content>

Page 46: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 46/171

 

MacrosAutomate and simplify your site

Page 47: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 47/171

DID YOU KNOW?

Macros Types of macros

.NET XSLT

Razor  Python Ruby

Your own with the iMacroEngine interface

Page 48: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 48/171

DID YOU KNOW?

Macros .NET macros

modify umbraco data integrate with external data

Page 49: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 49/171

DID YOU KNOW?

Macros XSLT macros

transform umbraco XML • Usually into HTML• Can also generate XML (RSS feeds, for instance)

Page 50: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 50/171

DID YOU KNOW?

Macros Umbraco’s built-in macro templates

Provide most of the functionality you’ll need 

Can often be used ‘as is’ 

Quickly modified

Easier to edit than create

Page 51: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 51/171

DID YOU KNOW?

XSLT XPATH

Is a bit like traversing folders from a commandprompt

• select="$currentPage/FAQArea/* “ 

Is a bit like SQL

• The 'where' clause is in [brackets]

• select="$currentPage/* [@isDoc] "

Advanced axis

• select="$currentPage/ancestor-or-self::* [@level = 2]

• Tip of the month: www.pimpmyxslt.com 

Page 52: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 52/171

DID YOU KNOW?

XSLT macros Discover the XML you’re working with 

/app_data/umbraco.config

• Contains the XML for the site’s content 

<xsl:copy-of select="…" /> 

• Echoes the XML

• View browser’s source to view output properly 

Or, <textarea><xsl:copy-of … /></textarea> 

Use with XSLT Visualizer toolbar button

Page 53: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 53/171

DID YOU KNOW?

XSLT macros Rules of thumb

Most XSLT macros are short

Umbraco.library and Exslt extensions

• Functions you’ll want to know and use 

• Make your own xslt extensions

▪ Either compiled dll or in app_code folder

▪ Inline with xslt is not best practice (slower performance)

Page 54: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 54/171

DID YOU KNOW?

Macro parametersPass parameters to a macro

<umbraco:Macro alias="MyMacro"

slogan="the friendly cms"

runat="server" />

Remember

Set the macro’s properties and aliasesor the parameters won't be sent through

Page 55: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 55/171

DID YOU KNOW?

Macro parameters Pass dynamic parameters to a macro

[#propertyAlias]

• Insert a page value

[$propertyAlias]

• Insert a recursive page value

[%cookieValueKey]

• Insert a cookie value

[@requestValueKey]• Insert value from a request collection

Page 56: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 56/171

DID YOU KNOW?

Macro parameters Test for multiple values

<umbraco:Macro alias="MyMacro"

slogan=" [#slogan],

[$tagline],

the friendly cms"

runat="server" />

Page 57: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 57/171

DID YOU KNOW?

Razor

<umbraco:Macro language="cshtml" runat="server">...

<umbraco:Macro FileLocation="~/macroScripts/my.cshtml"

runat="server"/>

And for XSLT fans… 

<umbraco:Macro language="xslt" runat="server">... 

• A macro engine package from Lee Kelleher

Macro code in templates

Page 58: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 58/171

 

PerformanceMaximal performance in one click

DID YOU KNOW?

Page 59: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 59/171

DID YOU KNOW?

How fast??umbDebugShowTrace=true

Cumulative StepTime Time

DID YOU KNOW?

Page 60: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 60/171

DID YOU KNOW?

During site and tour launch500,000 page views/hour

While under this load,

entire homepage renderedin 0.016 seconds

With no caching!

4 web servers

1 database server

DID YOU KNOW?

Page 61: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 61/171

DID YOU KNOW?

Macro caching effectiveness

No caching = 0.0503 sec.

With caching = 0.0001 sec.

(300x improvement)

DID YOU KNOW?

Page 62: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 62/171

DID YOU KNOW?

How fast is that macro? ?umbDebugShowTrace=true

Macro caching rocks!

Page 63: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 63/171

 

Macros

DID YOU KNOW?

Page 64: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 64/171

DID YOU KNOW?

Recursive Values Simple site-wide settings

Set a property on the home pageand use its value on all child pages

“Smart default” section-wide settings Editors can be over-ride on a page-by-page basis

Editors can leave empty to use default setting

Great for

Footers

Section title and color scheme

Banner images

Sidebar modules

DID YOU KNOW?

Page 65: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 65/171

DID YOU KNOW?

<root id="-1">

<FrontPage id="1234" nodeName="Home" isDoc>

<footer>address, email, copyright</footer>

<TextPage id="1235" nodeName="Products" isDoc>

<TextPage id="1237" nodeName="Servers" isDoc />

<TextPage id="1238" nodeName="Machines" isDoc />

</TextPage><TextPage id="1236" nodeName="Partners" isDoc />

<TextPage id="1239" nodeName="Email us" isDoc />

</FrontPage>

</root>

DID YOU KNOW?

Page 66: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 66/171

DID YOU KNOW?

Umbraco:item recursive

DID YOU KNOW?

Page 67: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 67/171

DID YOU KNOW?

No more empty tagsYour template has this:

<h2>

<umbraco:Item field="sectionTitle" ...

</h2>

But… if "sectionTitle" is empty you get:

<h2>

</h2>

Which will leave a gap on screen

The solution is… (not a macro!) 

DID YOU KNOW?

Page 68: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 68/171

DID YOU KNOW?

Umbraco:item before and after

DID YOU KNOW?

Page 69: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 69/171

DID YOU KNOW?

Umbraco:item NodeId=

<umbraco:Item field="MoreInfoLink"

NodeId="[#alias]" runat="server"/> 

• Fetch the property value for node specified• A sort of override for default currentPage without

using a macro; no xpath required

Xslt=

<a href='<umbraco:Item field="MoreInfoLink"

xslt="umbraco.library:NiceUrl({0})"

runat="server"/> 

• {0} contains the value of the field= parameter

Page 70: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 70/171

 

A Little Side DiscussionOn becoming a super hero to your users

Page 71: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 71/171

DID YOU KNOW?

Page 72: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 72/171

DID YOU KNOW?

Content organization Can make your life easy (or difficult)

Page 73: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 73/171

DID YOU KNOW?

Page 74: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 74/171

DID YOU KNOW?

Content organization Organize content into logical sections

according to website visitor’s expectations 

Url’s are created from the content tree structure 

Easier to remember urls

Helps with SEO

Place the homepage at the top level,and all other pages below it

Macros are easier with this structure

Also helpful for multi-language sites

DID YOU KNOW?

Page 75: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 75/171

DID YOU KNOW?

Content organization Container pattern

Keep detailed information in sub-pages

Easy for content editors

Render the result on the parent “container” with amacro

• Job postings

• Press releases

FAQs• Staff pages

DID YOU KNOW?

Page 76: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 76/171

DID YOU KNOW?

Content organization Container pattern – for data only

Keep detailed information in unique docType

Easy for editors to modify

Render the result with a macro

Set a ‘redirect to parent’ template for searchresults to work easily

DID YOU KNOW?

Page 77: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 77/171

DID YOU KNOW?

Media organization Rules of thumb

Organize the Media section into folders

More folders with fewer files are easier to live with

Store only items used in content pages in themedia section

Keep imagery used in the templates and csson the filesystem

•Users shouldn’t be changing these anyway 

DID YOU KNOW?

Page 78: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 78/171

DID YOU KNOW?

Simplify the user experience

DID YOU KNOW?

Page 79: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 79/171

DID YOU KNOW?

Simplify the user experience Do as much work for the user as possible

Better consistency

Easier for the users

More praise for you

Less time supporting users

DID YOU KNOW?

Page 80: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 80/171

DID YOU KNOW?

Simplify the user experience Organize tabs in logical order

Arrange docType properties

Supply property descriptions

Use mandatory and validation settings(if appropriate)

DID YOU KNOW?

Page 81: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 81/171

DID YOU KNOW?

Simplify the user experience

DID YOU KNOW?

Page 82: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 82/171

OU OW?

Simplify the user experience Rules of thumb

Add styles in the drop-down list

Set richtext editor width to match

site design for better WYSIWYG Create multiple RTE datatypes

• Allows control over width, styles, andtoolbar features

Ensure the right content appears in the right placewith docType “structure” 

Page 83: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 83/171

 

Custom Richtext EditorsMaximize usability and the WYSIWYG experience

DID YOU KNOW?

Page 84: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 84/171

Make your own RTE's Set width to match your design

Use unique CSS and styles dropdown list

Provide unique toolbar icons

Create as many RTE's as you need

DID YOU KNOW?

Page 85: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 85/171

Make your own RTE's

Page 86: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 86/171

 

Multi-Lingual SitesRunning multiple siteswith different languagesin one umbraco installation

DID YOU KNOW?

Page 87: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 87/171

Multiple sites Run multiple sites in one umbraco installation

Reuse document types, templates,stylesheets, scripts and macros

Remember, this only makes sense if the sitesshould share templates, css, etc. If not keepsites in individual umbraco installations.

DID YOU KNOW?

Page 88: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 88/171

Multiple sites Each site will have its own content structure

DID YOU KNOW?

Page 89: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 89/171

Multiple sites And its own domain or top-level url

DID YOU KNOW?

Page 90: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 90/171

Multiple sites And possibly its own language

DID YOU KNOW?

Page 91: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 91/171

Multiple sites Copy an existing site for a quick start

DID YOU KNOW?

Page 92: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 92/171

Multiple sites A few considerations regarding multiple sites

in one umbraco installation

URLs - domains or top-level nodes?

• example.com and example.dk• example.com/en and example.com/dk

URLs - international characters in URLs

ÆØÅ

Dictionary objects replace hard-coded text

DID YOU KNOW?

Page 93: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 93/171

Translation and translators In-house translators

Professional translation services

Workflow and translation tasks

DIY tools to help:

Dictionary item translator (link)

Event handler and Microsoft translate (link)

Page 94: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 94/171

 

Localize Document Property Labels

DID YOU KNOW?

Page 95: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 95/171

Localize docType property labels English (UK)

German

DID YOU KNOW?

Page 96: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 96/171

Localize docType property labels

>>

12 languagesout of the box.Or make your own

DID YOU KNOW?

Page 97: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 97/171

Localize docType properties

DID YOU KNOW?

Page 98: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 98/171

Localize docType properties

DID YOU KNOW?

Page 99: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 99/171

Localize docType property labels English (UK)

German

Page 100: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 100/171

 

Working while on holiday

DID YOU KNOW?

Page 101: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 101/171

(Un)Publish on schedule

Page 102: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 102/171

 

Another way of seeing things

DID YOU KNOW?

Page 103: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 103/171

Alternate templates Useful for:

RSS feeds

Mobile phone and iPad templates

Ask a question

Etc.

Syntax:

http://localhost/faq.aspx?altTemplate=rss 

http://localhost/faq/rss.aspx 

Page 104: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 104/171

 

UsersEnough with the content, let’s talk about users – and how to limit them

DID YOU KNOW?

Page 105: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 105/171

User permissions Control what actions can be performed

Set user type and fine permissions by user or node

Set start node in content and media tree Limit what part of the website is visible

Restrict access to sections 

Set up notifications

Get email alerts when certain actions occur

Page 106: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 106/171

 

Control User Access to Dashboards

DID YOU KNOW?

Page 107: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 107/171

This area

Is the

DASHBOARD

(you can put controls and tabs here)

DID YOU KNOW?

Page 108: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 108/171

<tab caption="Last Edits"><access>

<deny>editor</deny></access><control>/usercontrols/dashboard/lastEdits.ascx</control>

</tab>

Control access to dashboards

Grant/deny access to a section, tab or control

<grant>

<grantBySection> <deny>

Page 109: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 109/171

 

Ooopsies

DID YOU KNOW?

Page 110: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 110/171

Rollback

DID YOU KNOW?

Page 111: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 111/171

Audit trail

Page 112: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 112/171

 

Just like old times

DID YOU KNOW?

Page 113: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 113/171

Content channels

When Microsoft Word becomes a great webauthoring tool

Familiar tool for users

Great HTML markup (really!) Off-line editing

Clients available for everything

Must support the MetaWebLog API

Windows, Mac, Linux, iPhone, Android, iPad, etc.

Page 114: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 114/171

 

Packages

DID YOU KNOW?

Page 115: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 115/171

Don’t reinvent the wheel 

DID YOU KNOW?

Page 116: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 116/171

Stand on the shoulders of giants

Page 117: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 117/171

Page 118: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 118/171

 

The Umbraco Community

DID YOU KNOW?

Page 119: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 119/171

You’re never alone 

“It's only when looking for help

with another technology

that you realize just how good

we have it in the #Umbraco community.” 

- Matt

DID YOU KNOW?

Page 120: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 120/171

You’re never alone 

“Gotta love the #umbraco community. They

fight over who has helped more people....” 

- Chad Rosenthal

DID YOU KNOW?

Page 121: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 121/171

DID YOU KNOW?

Page 122: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 122/171

Looking for help

Paid

Umbraco Confidence

Umbraco.tv

Umbraco User’s Guide

Free

our.umbraco.org

Twitter (#umbraco)

Blogs (yahoo pipe feed)

In person

CodeGarden '12 (13-15 June, Copenhagen)

Regional meetups

Page 123: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 123/171

 

Read all about it

DID YOU KNOW?

Page 124: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 124/171

A hands-on guide in book form

Nik Wahlberg is lead author

Shipping now!

Umbraco Users Guide

Page 125: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 125/171

 

More Hidden Gems

DID YOU KNOW?

Page 126: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 126/171

Umbraco to go

Run Umbraco from a thumb drive

WebMatrix is fast, easy, low resources

WebMatrix is good. Really good.

Publish to live site Upgrade from SQL CE to full SQL Server (Express)

Open files in VisualStudio

Page 127: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 127/171

 

Steal almost any contentFrom any web service or feed

DID YOU KNOW?

Page 128: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 128/171

GetXmlDocumentByUrl()

Instant integration

Get any XML document (even xHTML)

From any website

Parse it, format it, display it

Even from XSLT

Can you say

External blog posts displayed on homepage? Latest betting odds?

Current weather?

Content from another umbraco site?

Page 129: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 129/171

 

2-way file synchronizationSource control and your favorite editors

DID YOU KNOW?

Page 130: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 130/171

2-way file synchronization

Work in Umbraco

Or work in your favorite editor

Change one and the other notices

CSS

JavaScript

Templates Python and Ruby

XSLT

Page 131: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 131/171

 

Config File SettingsYou want to know about these

DID YOU KNOW?

Page 132: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 132/171

<add key="umbracoReservedUrls" value="..." />

<add key="umbracoReservedPaths" value="..." />

<add key="umbracoHideTopLevelNodeFromPath" value="..." />

<add key="umbracoDebugMode" value="..." />

Web.config

DID YOU KNOW?

Page 133: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 133/171

<errorPage culture="en-US">1434</errorPage>

<TidyEditorContent>True</TidyEditorContent>

<PropertyContextHelpOption>icon</PropertyContextHelpOption>

<useDomainPrefixes>false</useDomainPrefixes>

<scheduledTasks><task log="true" alias="updateCRM"

interval="60"url="http://localhost/umbraco/updateCRM.aspx" />

</scheduledTasks>

<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">

/config/UmbracoSettings.config

Page 134: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 134/171

 

Lock/Unlock Pages During EditingNever fear two people editing the same page

DID YOU KNOW?

Page 135: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 135/171

Lock/unlock pages during editing

Concierge to the rescue!

Works with content and media

Publishing automatically unlocks page

Admins can over-ride locks

Watch the video  vimeo.com/3866212 

Page 136: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 136/171

 

Staging <> Live Deployments

DID YOU KNOW?

Page 137: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 137/171

Umbraco <> Umbraco

Umbraco <> file share

Umbraco <> SVN

API for others

(Hg is in the works)

Staging <> Live Deployments

Concierge 2 to the rescue!

Page 138: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 138/171

 

2 Ways to “Safely” Edit a Live Site (not that you would ever do this, right?)

DID YOU KNOW?

Page 139: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 139/171

Editing a live site

XSLT Visualizer

Test live macro before saving it

When happy, save xslt

DID YOU KNOW?

Page 140: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 140/171

Editing a live site

?altTemplate

Create or copy existing macro

Copy existing template

Update copied template to use new macro Use ?altTemplate= querystring for testing

When happy, update original macro

Delete temporary template and macro

Page 141: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 141/171

 

Who Uses Umbraco?A smattering of sites

DID YOU KNOW?

Page 142: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 142/171

DID YOU KNOW?

Page 143: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 143/171

DID YOU KNOW?

Page 144: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 144/171

Page 145: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 145/171

 

If Umbraco Were a Car...What do these Umbraco-powered sitesindicate about Umbraco?

DID YOU KNOW?

Page 146: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 146/171

If Umbraco were a car...

DID YOU KNOW?

Page 147: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 147/171

DID YOU KNOW?

Page 148: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 148/171

DID YOU KNOW?

Page 149: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 149/171

DID YOU KNOW?

Page 150: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 150/171

DID YOU KNOW?

Page 151: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 151/171

DID YOU KNOW?

Page 152: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 152/171

If Umbraco were a car...

DID YOU KNOW?

Page 153: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 153/171

If Umbraco were a car...

How would you describe Umbraco?

DID YOU KNOW?

Page 154: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 154/171

Just for fun... what CMS is this?

Bloated

DID YOU KNOW?

Page 155: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 155/171

Just for fun... what CMS is this?

Cobbled together

DID YOU KNOW?

Page 156: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 156/171

Just for fun... what CMS is this?

Boring

DID YOU KNOW?

Page 157: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 157/171

Just for fun... what CMS is this?

Not so stable

Page 158: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 158/171

 

Who is Umbraco?

DID YOU KNOW?

Page 159: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 159/171

Niels Hartvig

DID YOU KNOW?

Page 160: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 160/171

Per Ploug Hansen

DID YOU KNOW?

Tim Geyssens

Page 161: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 161/171

Tim Geyssens

DID YOU KNOW?

Page 162: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 162/171

Paul Sterling

DID YOU KNOW?

Page 163: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 163/171

AlexNorcliffe

DID YOU KNOW?

Page 164: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 164/171

Peter Gregory

DID YOU KNOW?

Page 165: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 165/171

Warren

Buckley

Rumor has it thatsir @warrenbuckley

is really an old, old manin a young body.#cgrumors #cg11

DID YOU KNOW?

Page 166: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 166/171

Casey Neehouse

DID YOU KNOW?

Page 167: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 167/171

ShannonDeminick

DID YOU KNOW?

Page 168: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 168/171

My t-shirt had thenames of 20 people

and companies who

believed in Umbracoin the very beginningor contributed heaps

-Niels

DID YOU KNOW?

h i b

Page 169: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 169/171

Who is Umbraco?

We all are!

DID YOU KNOW?

Page 170: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 170/171

Page 171: Cg11 Did You Know

8/22/2019 Cg11 Did You Know

http://slidepdf.com/reader/full/cg11-did-you-know 171/171

Thanks for coming!

More cool stuff atblog.percipientstudios.com