I love the smell of a fresh #umbraco installation. V5 may be awesome, but you can't argue with 4.7.1.1 with #uComponents either.

follow me on

Umbraco UK Developer Meeting Tips and Tricks

Sunday, July 20, 2008 by David Conlisk

During the course of the day lots of handy nuggets of information were traded back and forth across the table. I've tried to pull these into a single post, here, to save you from trawling through the minutes to find them:

  • If you're referencing an existing xslt template from another xslt template, you need to save both explicitly for changes made to take effect
  • When you are developing using Umbraco, open up the umbraco/umbraco.aspx window in multiple tabs in your browser so that you can switch back and forth between tabs without having to browse back to your active node each time.
  • To enable notification by email, for example when a blog comment is created from your site, simply log into the admin section, right click on the content node and choose notification. There you can select the actions that cause an email to be sent to the email address of the current user, for example when a node is created.
  • Good architecture is the key to a successful Umbraco site.
  • Use the hCard format markup when displaying addresses on the site. If you've got a Firefox plugin that recognises microformats then the addresses will be picked up properly. Google has also started to recognise these formats in site content.

    UPDATE! Paul sent on these links which may be useful on this point:
    http://microformats.org/wiki/hcard (the specification)
    https://addons.mozilla.org/en-US/firefox/addon/4106 (a Firefox add-on that allows you to view hCard data and export it to your address book from the browser. For a test, see http://destinationminibus.com/dealers.aspx - all the dealers are marked up as hCards and can be exported using the add-on).
    Google Maps results are now marked up using this format, so it's likely to become more familiar over time! http://googlemapsapi.blogspot.com/2007/06/microformats-in-google-maps.html
  • Use ImageGen to resize images, for example to create your thumbnails or force images to appear as a certain size on the site so as not to mess up the layout.
  • Xsltsearch is great!
  • umbracoUtilities includes a control for changing the MIME type of a page. SAS have rewritten this - use for changing the response type of the page
  • You can configure friendly error messages in the admin section for your content managers, etc, by configuring a friendly error page in the web.config file. This way they don't get the "yellow screen of death" with an incomprehensible (for non-developers) error message.
  • umbracoSettings.config:
    • you can configure the url rewriting based on the name of the content node, for example define the characters to be removed or replaced in the url (e.g. commas, exclamation marks, foreign language characters, etc)
    • configure allowed image types for the media folder
    • configure allowed attributes for the image tag
    • configure your 404 page by entering the ID of the 404 page content node
    • scheduled tasks can be set up here, for example for logging, newsletters, cleanup, cleaning the logs, etc.
  • Clean out the logs periodically to improve the speed of your site - you can use Thomas Hoehler's excellent utilities for this
  • Use the logviewer utility from Thomas' package to see the log entries in the Umbraco backend
  • You can also use Thomas' tool to clean out old versions of content
  • You can configure Umbraco to remove the .aspx extension (thanks for the link Neil!)
  • Check out Live Writer. You can use web services to access the Umbraco API from your metablogging software (e.g. Microsoft Live Writer, or Microsoft Word). This allows content managers to create new content pages in Umbraco without the need to log into the back end. Very useful for content editors who are not technical or are scared of the Umbraco interface.
  • You can use the RenderMacroContent function in XSLT to call a macro. Very useful, and used by Julien to achieve the content reuse for SAS sites.
  • See Douglas Robar's post on compressing http, css and scripts for faster umbraco sites the forum about using a 3rd party dll to compress the headers of your pages. Drop the dll into the bin folder, configure Umbraco, and it will concatenate all of your javascript includes on a page into a single file to reduce the number of requests and increase the speed.
  • There is a good Firefox plugin called Yslow that you can use to analyse your site speed - it's an addon for the Firebug extension for Firefox. (By the way, Firebug is essential!)
  • To configure highlighted items, for example news items which should appear on the home page, you can use a multiple content picker on the home page node instead of an attribute on the news items. This way it's much easier for content managers to choose highlighted items for the home page - they just go to the home page node - no need to trawl all of the news items setting and unsetting flags.
  • You can use actionhandlers to circumvent content tree rules, for example to create blog date folders programmatically but without allowing content managers to create blog date folders in the back end.
  • Use Tim Geyssens' NibbleFX package to import legacy data into your content tree. Specify the xml file containing the data and it does the rest, creating the doctypes and the content tree to match. Very slick, and great also for content -managing flash applications that exist using a static xml file (which the tool is designed for).

In version 4:

  • Masterpages can be used to organise your generated source code better, for example by using a javascript content section to place all javascript code in the page header.

>> Read on: State of the Art

 

If you found this article useful, please click the +1 button!

 

1 comment(s) for “Umbraco UK Developer Meeting Tips and Tricks”

  1. Gravatar of Bill Smith


    Bill Smith says:

    Dave, really useful article. Was just reconfiguring a friendly error page this morning. For your info, but you probably know this. •umbracoSettings.config: only redirects for known documnent types, ie: .aspx. otherwise, in addition, you have to create a custom page through IIS. Bill

Please leave a comment: