Navigatie

Contact

Send mail to the author(s) E-mail

View Richard Soeteman's profile on LinkedIn

RSS 2.0 | Atom 1.0 | CDF

Archief

Categorieën

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Sign In

Zoeken

# Wednesday, 25 March 2009
Wednesday, 25 March 2009 21:17:38 (GMT Standard Time, UTC+00:00) ( UmbImport | Umbraco )

This Blog is not active anymore, further posts will be available on my company website. Read new posts here

Exactly 1 year ago I've downloaded Umbraco for the very first time and loving it ever since. One package that I've created in September last year was UmbImport. While that was a cool package I'm happy to announce that today I've released a new beta version of UmbImport. The most requested feature was the ability to import members. I'm happy to announce that this feature is implemented now. Below you find  a screencast that demo's the member import.


Import members using umbImport from Richard Soeteman on Vimeo.

More changes

While member import is the biggest thing, it's nice to know what's also changed since the last version. I will be blogging about each feature/change the next coming weeks.

  • DataAdapters. The previous version of UmbImport only supported three datasources (Sql Server, CSV and XML). With the new version you can plugin your own datasource by creating a custom DataAdapter (in the free version this will be limited to 1).
  • Events during import. Events are added that you can handle in your custom code that notify you when a record is imported.
  • No more Dashboard control. UmbImport is moved from a dashboard control to a tree in the menu.
  • Better install experience. With Umbraco 4 it's easier to create a package and modify config files etc via PackageActions. UmbImport uses default and Custom package actions to improve the install experience.

What's next?

Within a few weeks I hope to get V1 released and have proper documentation that describe the functionality. After that I will work on UmbImport PRO, which will contain a few extra features such as save wizard steps, scheduled imports, automatic field mapping, support for more than 1 custom DataAdapter and more... The PRO version of UmbImport will not be free(prices are not available yet).

As always I hope that you like the package which you can download here

Comments [3] | | # 
# Tuesday, 17 March 2009
Tuesday, 17 March 2009 09:04:43 (GMT Standard Time, UTC+00:00) ( Umbraco )

This Blog is not active anymore, further posts will be available on my company website. Read new posts here

Currently I'm working on an Umbraco V4 site and had an issue when rendering the meta tags.

The problem:

In my template I've added the keywords and description tag in the head to render the meta information for keywords and description.

<head runat="server">
<meta name="keywords" content="<umbraco:Item field='metaKeywords' recursive='true' runat='server'></umbraco:Item>" />
<meta name="description" content="<umbraco:Item field='metaDescription' recursive='true' runat='server'></umbraco:Item>" />
</head>

I've seen several examples that used the <Umbraco:Item> control with single quotes to set the properties so I thought this should work. However when the output was different then I would expect:

<head>
    <meta name="keywords" content="&amp;lt;umbraco:Item field='metaKeywords' recursive='true' runat='server'>&lt;/umbraco:Item>" />
    <meta name="description" content="&amp;lt;umbraco:Item field='metaDescription' recursive='true' runat='server'>&lt;/umbraco:Item>" />
</head>

The Cause:

When I took a detailed look on this issue I saw that the head tag in my template had a Runat="Server" attribute. When I removed this attribute the output was rendered fine. I'm using a few Ajax Controls on forms that throws an error when it can't find a Head tag with the Runat="Server" attribute, so simply removing it isn't the solution.

The solution,  Macro's to the rescue:

With a Macro and an XSLT file this issue can easily be solved and after thinking of it it's also a better solution because it's a better separation between HTML and ASP.Net code. To solve it you just create a Macro that excepts two parameters (keywords and description). Then create an XSLT file that outputs the values like this example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ &lt;!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"
    exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="keywords" select="/macro/keywords"/>
<xsl:variable name="description" select="/macro/description"/>
<xsl:template match="/">
<meta name="keywords" content="{$keywords}" />
<meta name="description" content="{$description}" />
</xsl:template>
</xsl:stylesheet>

Then use the Macro in your template:

<umbraco:Macro keywords="[$metaKeywords]" description="[$metaDescription]" Alias="MetaTags" runat="server"></umbraco:Macro>

Now you have exact the same functionality and it will work in any situation. Because I'm using the $ sign before the fieldnames that are passed to the Umbraco. Umbraco will do a recursive search for the values of those properties, just like the recursive attribute does on the Umbraco:item tag.

Comments [2] | | # 
# Tuesday, 03 March 2009
Tuesday, 03 March 2009 12:39:34 (GMT Standard Time, UTC+00:00) ( Package | Umbraco )

This Blog is not active anymore, further posts will be available on my company website. Read new posts here

Last week Warren Buckley asked for a URL Rewrite Action to use in his awesome next version of the  Umbraco Creative Website Starter site (if Warren release it make sure you download it, it's great!!). I was already thinking of creating some sort of packactions library so I started working on that a little bit sooner (and more in a hurry) than expected. The result is  a new Codeplex project called Package Actions Contrib that will hopefully be used by the community and I'm also hoping for a lot of contributors that will be part of this project.

Package Actions?

Package actions are great to include some custom functionality during the install of your package, just by implementing the IPackageAction interface and the use of Package XML in the package creator. This PDF describes all default package actions that are included in the V4 release of umbraco and it also describes how to use them.

AddUrlRewriteRule Action

Currently only one package action is included in the project. That is the AddUrlRewriteRule Action. With the AddUrlRewriteRule  you can add a new rewrite rule to the UrlRewriting.config file. The xml snippet below descibes the xml for adding the UrlRewrite rule to the config file. The action element is the normal element that you must include for each package action. The Alias is the alias that is used in the AddUrlRewriteRule class. The undo option is implemented but will not work because of this bug I recently found. And the add element is what you normally will add manually in the UrlRewriting.config file.

<Action runat="install" undo="true" alias="AddUrlRewriteRule">
    <add name="CWS_emaiAFriendID" 
    virtualUrl="^~/email-a-friend/(.[0-9]*).aspx" 
    rewriteUrlParameter="ExcludeFromClientQueryString" 
    destinationUrl="~/email-a-friend.aspx?nodeID=$1" 
    ignoreCase="true" />
</Action>

What's next

The next thing that will be added to the project is not a new action but it will be a tool where you can test your package action and package action xml without actually having to install a package. Instead you can upload the dll and enter the xml and press the testbutton to validate that the action installed or uninstalled correctly or what errors did occur. Also I like to have some documentation in the way that the normal package actions are described.

Contribute to the project

I think this project can only be a success with help from the community. So if you have some really cool custom package action now that could be useful to share please apply a patch on Codeplex or contact me by mail, also if you just have a great idea that could be included in the project.

Click here to visit the Codeplex project site. Hope to see some really nice package actions included in the contrib.

Comments [2] | | #