Archive for April, 2009

Installing Umbraco Packages 1

I recently got a comment from a person that downloaded a package but didn’t know what steps to take to installing it.
So here is a small how to.

After you have successfully logged into umbraco go to the developer section (section menu is on the bottom left, if you don’t see the developer icon you don’t have permission to view that section).


Then expand the Packages tree


Since we’ll install a local (downloaded) package select ‘Install local package’, the install local package page will load.


Then just choose the package from your machine and hit the load package button (it won’t be installed yet) .

Now (if it’s a valid package) you’ll see the next step. Here you’ll need to accept the license and hit the install package button


If the package contains a custom usercontrol with some custom installation steps that will be loaded next (like in this case with the datefolder package).


Once these custom steps have been completed (if there are any) the package should be installed.

You should now be able to view the installed package in the ‘installed packages part’ of the packages tree.


There you’ll also be able to uninstall the package.

New Package - Related Media 10

Based on the related links datatype that’s been added to umbraco v4.

This is a similar datatype but for selecting media, so a multiple media picker.


You can add media by setting a caption and selecting a media item. Very similar to the related links.

The package will also install a xslt and marco that shows how to use xslt to display the stored media.

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE xsl:stylesheet [
  &lt;!ENTITY nbsp “&#x00A0;”>
    exclude-result-prefixes=”msxml umbraco.library”>
  <xsl:output method=”xml” omit-xml-declaration=”yes” />
  <xsl:param name=”currentPage”/>
  <!– Input the related links property alias here –>
  <xsl:variable name=”propertyAlias” select=”string(’relatedmedia’)”/>
  <xsl:template match=”/”>
    <!– The fun starts here –>
      <xsl:for-each select=”$currentPage/data [@alias = $propertyAlias]/media/item”>
          <xsl:element name=”a”>
                <xsl:attribute name=”href”>
                  <xsl:value-of select=”umbraco.library:GetMedia(./@id,’false’)/data [@alias = ‘umbracoFile’]”/>
            <xsl:value-of select=”./@title”/>


Related Media Package: download

New Package - Mail Engine 73

This is a first version of a new mailer for umbraco v4. It’s similar to the ultrasimplemailer but one main difference is that it isn’t a datatype but it’s a new item in the context menu. Since it needs rendertemplate support it’s only possible to use it with v4.0.1 and upper versions.



After Installation you’ll have a new item in the context menu: send as mail.


Hitting this option will open a new modal. Where you’ll be able to send a published document as a mail.


The document needs to be published because the mail contents will be fetched from the rendered document output. Trying this on an un-published document will result in an error message.


In the first step you’ll need to supply:

  • From emailaddress
  • From display name
  • Subject (this will be the document name but can be chanched)



And choose to send it to a single email address or to multiple (mass option).

When sending a single mail you’ll just need to supply an email address. If a member is found with that email address his data will be merged (more about the merging below).


Choosing the mass option will allow to select a membergroup and to supply a filter.

For example if you have a property on your membertype with the alias unsubscribe of the type true/false and you only want to send to members that don’t have this set to true.

You can supply the filter



Once everything is set it’s just a matter of hitting the send button and you’ll see the progress in the status part.


Merging member data

It’s possible to merge member data. If one of these are found then they will be replaced

  • [memberId]
  • [memberName]
  • [memberLoginName]
  • [memberPassword]
  • [memberEmail]

Custom properties are also possible

  • [custompropertyalias]

So something like

Hi [memberName],

Your password is: [memberPassword]

Will be recieved by the member as

Hi John,

Your password is: 1234



Another detail is that if there are images they will be added as a linked resource.



The package will also add an xslt extension, making it possible to send a rendered page directly to an email address or a member from xslt (with merging of data).

And it’s also possible to use the methods from .net.

A quick example:

I have setup a forgot password page that looks like this when previewed:


And I would like to use the PasswordRecovery control to send this mail instead of the regular passwordrecovery mail.

So all I need to do is override the PasswordRecovery mail using the SendingMail event.

 protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
                “Password recovery Mail”,
            e.Cancel = true;

And call the SendMailFromPageToMember method, supply a from email address, the member (using umbraco.cms.businesslogic.member)  , the subject and the id of the page.

The result:


Mail Engine Package download