Home

Using categories as tags in EPiServer

By Johan Pettersson 23 December 2009 15:49

First of all, big thanks to Anders Hattestad and all his great contributions to the community! Some months ago he posted a great post on how to use categories in a better way. I´ve taken his code and refined it a bit.

Read more...

How to fix the indentation-bug in the category administration

By Johan Pettersson 22 December 2009 18:16

The indentation got lost somewhere in the newer versions of EPiServer. In older versions and in EPiServer 6 there is a spacer-gif (hello 1999). To fix it (not in a nice way) in EPiServer 5.2.375.236 just replace all the markup in /UI/Admin/Categories.aspx with this:

Read more...

Posted in EPiServerTags , ,

PermalinkComments (0)

Convert symbol to unicode

By Johan Pettersson 16 December 2009 17:28

Lately I´ve been working a lot with migrating technical documents to EPiServer. These documents often contained

<font face="symbol">W</font>

instead of Ω.

So I made a function that converts symbols to unicode characters.

Read more...

Using block elements as Dynamic Content

By Johan Pettersson 10 December 2009 17:05

When inserting dynamic content into the editor it gets surrounded with a p-element if you're inserting it into a new paragraph.

Let's say our dynamic content Teasers renders a div-element as a wrapper, the page won't validate beacause it's not valid to have a div in a p.

We can easily fix this before the PageData gets persisted.

Read more...

Edit page link

By Johan Pettersson 24 November 2009 20:13

If you’re like me and don’t like the on-page-edit-right-click-menu but still want provide a simple shortcut for editors to edit the current page.

Our markup...

<a href="<%= CurrentPage.EditURL() %>">Edit this page</a>

... and our extension method

public static string EditURL(this PageData page)
{
    string baselink = UriSupport.AbsoluteUrlFromUIBySettings("edit/");

    return string.Format(
        "{0}SwitchLanguage.aspx?language={1}&epUrl={2}",
        baselink,
        page.LanguageBranch,
        HttpUtility.UrlEncode(string.Concat(baselink, "default.aspx?id=", page.PageLink.ToString())));
}

Of course you have check access rights before rendering the link.

Browse by

Tags

Dates

2010
August (1)
April (2)
January (2)
2009
December (4)
November (2)
October (1)