Posts tagged umbraco

Posted 1 year ago

New Umbraco site for lmi.no (The Association of the Pharmaceutical Industry in Norway) by bouvet

Posted 1 year ago

Add Email as Node

Email as Node adds a macro for adding emails to your Umbraco tree as nodes. It’s a simple add newsletter email macro.

More info here: http://our.umbraco.org/projects/website-utilities/add-email-as-node

Posted 1 year ago

Audio Player for Umbraco

A simple audioplayer for Umbraco

More info here: http://our.umbraco.org/projects/website-utilities/audio-player

Posted 2 years ago

Tutorial: jQuery Coverslide integrated with Umbraco

This tutorial show how to integrate the jQuery Coverslide found here: http://dev.jqueryui.com/browser/branches/labs/powella/coverslide?rev=2701, with Umbraco.

First you need to download the zip file, you’ll need almost all the files.

Add the following files to your “scripts” folder:

  • jquery-1.3.2.min.js (if you haven’t jquery allready)
  • jquery.bounds.js
  • jquery-ui-1.7.1.custom.min.js
  • ui.coverslide.js

Copy the folowing file to your css folder:

  • base.css

Add the references to your head section of your master.

Then create a usercontrol looking like this, let’s call it “coverslide.ascx”:

<asp:Repeater  ID="rep" runat="server">     
<HeaderTemplate>
<div class="ui-coverslide ui-coverslide-stack">
<ul id="stack">
</HeaderTemplate>
<ItemTemplate>
<li>
<img src='<%# Eval("FilePath") %>' alt='<%# Eval("Text") %>' />
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
 </div>
<div id="scrollbar"> </div>
</FooterTemplate>
 </asp:Repeater>

The codebehind should look identical to to the codebehind file described earlier in “MediaFolderContent”:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using umbraco.presentation.nodeFactory;
using umbraco.cms.businesslogic.media;

namespace HeltBlank.UmbracoModules
{
public partial class MediaFolderContent : System.Web.UI.UserControl
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

Media med = new Media(MediaFolderID);

var lst = from p in med.Children
where p.getProperty("umbracoFile") != null
orderby p.Text
select new { Text = p.Text, FilePath = p.getProperty("umbracoFile").Value };

rep.DataSource = lst;
rep.DataBind();

}

public int MediaFolderID { get; set; } //type: mediaCurrent
}
}

 Then in umbraco do the following:

  • Create a macro with the usercontrol you just created
  • Add a property to the macro called MediaFolderID, type: mediaCurrent
  • Add the macro to your template or the rich text editor
  • Select a folder containing images
  • Save, and you’re good to go

Sources: http://dev.jqueryui.com/browser/branches/labs/powella/coverslide?rev=2701

Posted 2 years ago

A little note about umbracoUrlAlias

The umbracoUrlAlias just make me happy. You can easly store your old urls from for example your old cms or blog.

An example when importing content from blogengine you can use this approach:

docNode.getProperty("umbracoUrlAlias").Value = blogenginexmlitem.Attribute("post-url").Value.ToLower().Remove(0,1)

Remember the “ToLower” since umbracoUrlAlias uses lowercased url, and remove the first letter in the url, since it should not start with “/”. For example a blogengine post url: “/post/YourPost.aspx” should result as this: “post/yourpost.aspx”