Blog entries tagged with Code Samples

One page - Many fathers: a solution using EPiServer Events

by: Anders Hattestad

In a tree structured CMS system where all pages have only one father there are times when you would like to display one page in different places. And you even would like to make the same page appear to the end user as 2 different pages,with 2... [ Read full article ]

16 February 2010  30 Comments

Itera.Media a easy solution for media files

by: Anders Hattestad

How many times have you made a property called IntroImage and used that to display an intro image on a page? Then how often have you gotten a question about how do we add a flash, or can we have this image a bit smaller/larger on a particular page... [ Read full article ]

30 October 2009  6 Comments

LanguageManager using DynamicDataStore

by: Anders Hattestad

I have looked forward to the new propertbag concept in CMS6. I have always wanted a store for different kind of data/settings that are not pages. One area I find troublesome is the language xml files. If you have more than one server you need to... [ Read full article ]

22 October 2009  1 Comments

Properties in Dynamic Content dont know the actually CurrentPage.

by: Anders Hattestad

In a project I’m working on we are using Dynamic Content to display media parts like images, video’s, flash.  Inside this Dynamic Content we are using a PropertyUrl to hold the selected media source. The problem is that when you get the popup with... [ Read full article ]

18 August 2009  2 Comments

A quick tip on postback in a property

by: Anders Hattestad

Two years ago Mari tipped me about a method to disable the popup that appear  with the text “Do you want to navigate away from this page” if you do a postback in the edit part of a property. Today I needed that code and did some searching around.... [ Read full article ]

26 June 2009  4 Comments

Yet another admin property manager

by: Anders Hattestad

This is yet another admin plugin that helps manage the different page properties. My twist is the use of PageAdapter so that I don't have to make my own plugin, but can override the built in admin page for page types. As with all page/control... [ Read full article ]

14 May 2009  1 Comments

Hiding tabs based on roles

by: Anders Hattestad

Recently needed to hide some tabs in the edit mode of dynamic properties. I first tried to attach to the PropertyDataForm (the control that display the dynamic properties) with the gui plugin trick , but the ICustomPlugInLoader is not checked when... [ Read full article ]

09 May 2009  1 Comments

PropertyAdapters updated

by: Anders Hattestad

Have added some cool functionality to Hattis.PageAdapters If you use EPiServer:Property to show your attribute you can try out these 4 new Attribute tags: Format Remove Text Translate EPiServer out of the box will render the following: <... [ Read full article ]

16 April 2009  12 Comments

New module: Hattis.PropertyAdapters

by: Anders Hattestad

There are several ways of changing properties in EPiServer. PropertyAdaperts is one way, and I have made some of them here. I make heavy use of Hattis.Config to let the administrators turn on and off feature. Mr Nyström had a blog with 15 wishes .... [ Read full article ]

15 April 2009  1 Comments

New module: Hattis.EmbeddedResource

by: Anders Hattestad

Recently I needed use an embedded resource but I wanted to be sure that only users that could access the admin part of episerver could access it.  Many of you have made code that works like an virtual filsystem, and I have used these before. But I... [ Read full article ]

14 April 2009  2 Comments

Change LinkCollection with PropertyDataControlAdapter

by: Anders Hattestad

Recently Steve made me aware of PropertyDataControlAdapter and how you could use it to change the edit mode of a property. We are in a process of cleaning up the editor interface and come across a perfect place to use my new knowledge. When you us... [ Read full article ]

01 April 2009  6 Comments

Category - more than labeling

by: Anders Hattestad

Have any of you used categories to categorized the content of the site? I guess not. When the category structure contains more than 20 element it gets almost impossible to navigate and use the category tree. My guess is that most of you uses the... [ Read full article ]

21 March 2009  7 Comments

Action window template

by: Anders Hattestad

The action window is a place where you can put a variety of functionality into. The cool part about it is that you can have it open and click around in edit mode and have you action window app display relevant information about where you are. But ... [ Read full article ]

24 February 2009  3 Comments

Please dev's, you are making a framework p2. Dont referer to fields, use a Property.

by: Anders Hattestad

A while ago I had a blog where I pointed out too the developers that they are making a framework and asked them not too use private/internal. The reason for this request was that its make our life as a developer much easier when we can reuse code... [ Read full article ]

08 February 2009  5 Comments

Show value of a inherit property in Edit mode

by: Anders Hattestad

EpiServer have some cool features when it comes too properties and inherits. There are several ways the inherit can come from. If a page is on two languages, the not language depended fields from the master page will be inherit to the language... [ Read full article ]

27 January 2009  6 Comments

Page events, what events are registered

by: Anders Hattestad

When you make some code based on events it's easy to lose control on what events are registered where. I therefore made my self a small report to inspect the different page events and to show me the registered events for each of them. The differen... [ Read full article ]

19 December 2008  8 Comments

Properties to a Property - the solution?

by: Anders Hattestad

EPiServer has a lot of cool features, but I have been missing is the possibility to have global settings. Many times when we make some generic components we need some kind of configuration to reuse them. Examples on what I mean is 1) a... [ Read full article ]

05 December 2008  5 Comments

Dynamic Content base class

by: Anders Hattestad

Have made myself a base class which implements the dynamic content interface and have some functions to save and retrive the state based on what properties are in the PropertyDataCollection. Its pretty straight forward but thought I was going to... [ Read full article ]

01 December 2008  4 Comments

Please dev's, you are making a framework. Don't use private/internal

by: Anders Hattestad

I admit it. I'm addicted to Reflector. I browse around a lot inside the EPiServer dll's. If you have there is a lot of cool and useful code inside the EPiServer dll's. Many places there are hidden pearls where a developer can extend the existing... [ Read full article ]

23 November 2008  15 Comments

&lt;EPiServer:Property on steroids /&gt;

by: Anders Hattestad

How many times have any of you created a function that checks two or more properties and return the first one that is not null or blank. Or even if one property is true, then display another property. And have you ever made a static function that... [ Read full article ]

06 November 2008  10 Comments

How to use Attributtes to dynamically let editors change MasterPage on your EPiServer-site

by: Anders Hattestad

I like to dynamically add and remove features from my EPiServer sites.  When i make some new features i try to make them not strict to know implementions, and are using Attributtes as a way to retrive future implementions. Yesterday i needed to ge... [ Read full article ]

23 October 2008  1 Comments

Properties in CMS 5

by: Anders Hattestad

Problem: How to create a EPiServer property which contains other EpiServer properties. Why: Most properties in EPiServer are pretty specialized and are often depended on each other to make the page show correctly. some uses of a MultiProperty  are... [ Read full article ]

20 October 2008  35 Comments

EPiTrace logger