-
Visual aid for finding page usages directly in EPiServer edit mode page tree extending node tooltips
Recently, I have found myself wanting to know what pages are referencing certain other pages, or sub pages for that matter, while surfing around in the EPiServer edit mode. Having worked with control adapters to extend built-in EPiServer functionality quite a lot lately, I decided to create a simple one that would make my life…
-
Think things through, or: Simple way to 404 Not Found instead of EPiServer login screen for unpublished pages
I spent some time today attempting to make visitors land on a custom 404 Not Found error page when surfing to EPiServer pages that are no longer published; i.e. pages where the StopPublish date has passed (click here to skip my rant and go directly to the solution). The behaviour that we were experiencing on…
-
Being friends with the PropertyControlClassFactory, or: 101 ways to change EPiServer built-in property appearances
As I have been playing around with using ControlAdapters to change the rendering of built-in EPiServer properties lately, I got curious on what else I could possible do to modify them. As it turns out, the EPiServer PropertyControlClassFactory is a great ally in doing this. Hence, this post mostly revolves around different ways of getting…
-
The <EPiServer:Property .. /> just for fun, what output really gets generated for those PageData Property Members?
I created a few test page types along with some templates and EPiServer pages in order to test outputs from <EPiServer:Property .. />. The HTML comments are not part of the output, obviously, and I cleaned away attributes such as ids, inline styles and CSS classes. Furthermore, I chose to be blind to how useful…
-
Complete and concrete example of what an ASP.NET WebForms Model-View-Presenter project may look like using StructureMap, NUnit and AutoMoq
For quite some time now I have been thinking of creating some sort of sample project to show how a Model-View-Presenter approach may be used in an ASP.NET WebForms project. Lots of what is out there on this subject seem to be rather fluffy in nature, bits and pieces, not really giving you everything that…
-
Internet Explorer loses Referrer when redirecting or linking with JavaScript
I came across another Internet Explorer feature today as I was debugging a piece of code related to adding referrer URLs when submitting input forms. It worked perfectly on all versions that I tried of Firefox and Chrome, the referring URL was there, but when it came to IE it just would not give me…
-
Supplying EPiServer scheduled jobs with parameters through Admin Mode
I have always missed a way of supplying arbitrary input parameters to EPiServer scheduled jobs through the Admin Mode scheduled job interface. As Stefan Forsberg laughingly pointed out to me when I told him about my POC for this functionality (something in the lines of “Oh, I see you have found yourself a hammer.”), I…
-
Allowing web editors to apply PageType based filtering on the EPiServer edit mode PageTree
When you have an EPiServer installation containing thousands of different pages built up by far-too-many page types, locating pages of just one of them may turn out to be just a little too time consuming. Since I have grown to like the adaptive control approach more and more lately, I decided to create a filtering…
-
Recursively finding an ASP.NET control with a specific ID
I wrote a short recursive method for locating specific controls while having no idea of where they are in a nested structure; actually, I added one dynamically and needed to find it again. This will return the first control matching the ID below the supplied root control, if it can find one of course. FindControlRecursively…
-
Making the EPiServer scheduler run your Windows PowerShell scripts
Some time ago I wrote a post about retrieving and updating the MaxMind GeoIP database using Windows PowerShell scripts, and suggested the possibility to have the Windows Task Scheduler automating the process. Mostly for my own amusement, I decided to have a go at making the EPiServer scheduler do the work as well; perhaps there…
-
Surviving IE, or: How to render different markup depending on devices and browsers
The short answer would be, “Create a control adapter, add it to your .browser file and have it applied using browser recognition”. If you want the longer verion, you will have to continue reading. First, let us start with some basics on control adapters. I find them extremely useful tweeking built-in EPiServer (the CMS that…
-
Keeping your hair from turning gray, or: How to style the asp:FileUpload control using control adapters
The other day, I got a question from a former collegue of mine who was having trouble styling the ASP.NET FileUpload control, as it renders into a particulary nasty bit of HTML; i.e. an <input type=”file” /> tag. // The .NET control <asp:FileUpload ID="FileUpload1" runat="server" /> // renders into <input id="FileUpload1" type="file" name="FileUpload1" /> He…
-
GeoIP database update in multiple webserver environment using Windows PowerShell scripting
The MaxMind GeoIP database (shipped with EPiServer Framework) is rather useful when wanting to show geographically specific information to visitors as they surf around the site. Since mapping the correct requests to the proper regions may be rather important generating value, the need of having a fresh database copy quickly comes into focus. Manually updating…
-
Using Windows Task Scheduler to automatically run PowerShell scripts
Windows PowerShell scripting is a powerful way of automating otherwise tiresome and error prone manual tasks. I recently looked into how I could have Windows running my scripts for me. It is not difficult, but it still took some poking around to get done. New tasks are added using the Create Task option in the…
-
Programmatically created pages getting wrong master language in migrated EPiServer environment
I ran in to a problem with my migrated EPiServer 4 website when creating new pages programmatically. The old site was using English as the master language, but my new one would be all in Swedish. I had used the version of the Advanced Language Manipulation Tool that Mari Jørgensen updated to convert my pages,…
-
Changing default values on built-in EPiServer properties
A client was using CurrentPage.Changed.ToShortDateString() for displaying a Last updated date in the inner footer of their pages. They often, however, forgot to select the Mark page as changed-checkbox on the Settings tab, and asked me if it was possible to have it selected by default. Here is a simple way to do it. Global.asax.cs…
-
Must select Show data for all pages checkbox in Edit mode to find submitted EPiServer XForms Form Data
I noticed a problem with a customer’s XForm earlier; no matter how many times I posted data, I was not able to find it through the Edit mode Form Data-tab. It was not until I marked the checkbox Show data for all pages that I got any hits. The XForm data exist in a table…
-
404 error page when accessing Root Folder or Recycle Bin in EPiServer Edit mode
An annoying problem that sometimes occur in EPiServer websites happened to my new EPi 6 R2 the other day. I have seen it before but always seem to forget what the reason is, and have to waste valuable time looking to solve it. So, here it is. Hopefully it may save somebody a bit of…